• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Steven Mac
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's with the hard-coded local IP address?

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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic