Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session State  RSS feed

 
Pawan Ramchandani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to know the state of session when we redirect or forward to request.
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pawan,
Didn't understand u'r question well. But as far as I know, the session will continue to exist until the server kills it, or the client logs out.
 
Bryan Basham
author
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Pawan,

A session, once created, will exist whether you send a (client-side) redirect or if you do a (server-side) forward. However, if the redirect sends the user to a different host (or even a different web application within the same container), then that host/app will not share the session object.

HTH,
Bryan
 
Pawan Ramchandani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Bryan.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!