File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Redirecting changing server name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Redirecting changing server name" Watch "Redirecting changing server name" New topic

Redirecting changing server name

Steve Leach
Ranch Hand

Joined: Sep 24, 2003
Posts: 46
Hi all
I have just loaded my application onto a new server, and almost everything is working properly, except...

when called with a relative path name is changing the name of the server, which means the session cookie gets lost. The server name it is changed to is an alias defined in the <host> section of the server and is also what request.getServerName() returns.
Has anyone seen anything like this before ?
Steve Leach
Ranch Hand

Joined: Sep 24, 2003
Posts: 46
Once again I've sorted things out myself before anyone bothered responding. I'm starting to wonder whether there is actually any point in using this forum.

The problem was that the new server was running under Apache with mod_jk, and the Apache config was specifying the wrong name.
Vasilis Karas

Joined: Mar 16, 2004
Posts: 24
Don't get dicouraged. Keep posting. Appreciate your sharing the solution.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
You asked if anybody had seen that before - given that the solution was really pretty obscure, and that your first and second posts were separated by less than a day, you really should not be surprised.
anyone bothered responding
Did you really think that there were people reading that post who knew the answer but didn't respond out of spite?
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

And keeping in mind that quite a few of us are not real programmers, so dont know the intricacies of running Apache on Linux..

The future is here. It's just not evenly distributed yet. - William Gibson
Sonny Gill LinkedIn
Steve Leach
Ranch Hand

Joined: Sep 24, 2003
Posts: 46
Sorry for the spot of petulance. However, by throwing my toys out of the pram at least I discovered that I'm not being ignored
I agree. Here's the link:
subject: Redirecting changing server name
jQuery in Action, 3rd edition