• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session context accross 2 ports  RSS feed

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I call a servlet running on a different port in a webserver, do I lose session variables that I had stored?
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably, but it depends a which webserver and/or Servlet Container you are using. If both your webserver listeners are using the same Servlet Container, then you might be able to share session information.
 
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you use hrun there is a way to set it up to use 2 different urls for different URLs. i dont know about ports though.
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing Brett may have meant JRun, rather than hrun. If not, please let me know more about hrun ...
 
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as they are running on the same JVM, then it is not a problem.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More precisely, I think it's possible as long as they are running in the same classloader. Also I believe that some servers allow live sessions to be stored in a database or shared file system for access from multiple classloaders, JVMs or even different machines. This is why there is a requirement/suggestion that only serializable objects are placed in a session.
 
Brett Knapik
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah i ment jrun
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!