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

Server Name issue

Tom Henricksen
Ranch Hand

Joined: Mar 23, 2004
Posts: 136

I have a servlet that puts some things in session and calls a jsp. That JSP pulls the objects out and displays them.
The server that host this webapp has an alias used to access it. If I call the app from the server alias when it gets to
the JSP the session objects are not there. If I call the application through the actual server name the session information
is there.

Servlet Code

JSP Code

If I call request.getServerName() it prints out the actual server name not the alias server name. The server is running EAServer 5.1. The JSTL is version 1.0. Is this something with the server config or maybe the way I put things into Session scope?
Thanks in advance,
[ December 20, 2005: Message edited by: Tom Henricksen ]
Tom Henricksen
Ranch Hand

Joined: Mar 23, 2004
Posts: 136

Is this being avoided because of EAServer?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Originally posted by Tom Henricksen:
Is this being avoided because of EAServer?

Perhaps. It's certainly not a server I've ever had any experience with. You might want to try the same setup on something more widely used like Tomcat.

The alias issue makes me wonder if it's a problem with the cookie that is maintaining the session id.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Server Name issue
jQuery in Action, 3rd edition