aspose file tools*
The moose likes Servlets and the fly likes ssession doesn't seem to be storing/holding object on server-works local Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "ssession doesn Watch "ssession doesn New topic
Author

ssession doesn't seem to be storing/holding object on server-works local

Steven Mac
Greenhorn

Joined: May 27, 2010
Posts: 13
Hi Everyone,

I am trying to get an app deployed by today into production. I noticed last night that when I promoted up to the tomcat server, the object that I stored into session was not found. Everything seems to work fine on my local tomcat installation, but once I goto server, it is as if its not being held.

For example, I have a form that the user fills out. I check the fields and if there is an error, I store a quick flag, and then redirect to another servlet.



In the other servlet, I am saying:


What happens is if the flag is true, I put up an error message that there is a problem. At the end of the servlet, I state this to clear things out:



Everything works fine on the local tomcat system, but doesn't appear working correctly on a hosted server provider that has me in shared environment.

Thanks for any help you provide today.
Steven Mac
Greenhorn

Joined: May 27, 2010
Posts: 13
I did some quick testing with barebones servlet

I set an object in Servlet 1, then call Servlet 2.

The object is found when running locally with Tomcat. When I put onto the server, the object cannot be found. Here is a local copy version.



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

What's with the hard-coded local IP address?

out.println("<a href=\"http://192.168.1.101/servlet/GetSession\">GetSession</a><br>\n");


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: ssession doesn't seem to be storing/holding object on server-works local