Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sessions in JSP/Servlets

 
Lucky Narayan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a newbie, so treat me gently :-)
My question is in JSP, you have the session concept. But how does this work in real world? Meaning, many of the production env. will have multiple machines (or JVMs) to load balance, correct? The session concept works only when they are all in one single JVM, correct? So, is it that sessions will work ONLY if I know for sure that one machine or one JVM will be used in production environment? Any help/suggestions appreciated!
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can try persisting your session data into a common database (which you have to eventually do, anyway ). You might find this javaWorld article interesting.
-anthony
 
George Carlson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I'm a servlet and jsp programmer for Novell where we have a server cluster. I know with us that once a user gets a handle on a server, that ip address will keep the handle on the same server until the server is restarted so this is not a problem
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic