| Author |
HttpSession
|
Parth Twari
Ranch Hand
Joined: Jan 20, 2010
Posts: 163
|
|
Source: Marcus quiz
Data in a HttpSession attribute will not be available if the web server restarts
true or false?
Answer: false
Explaination: Although session attribute data may dissapear if Tomcat is restarted, this is not guaranteed behaviour and some web servers may store session data in a database.
What does the spec say?
|
Parth Tiwari
| Pursuing Bachelor of Engineering | OSUM Club Leader | SCJP 6 | SCWCD 5 |...
|
 |
Frits Walraven
Rancher
Joined: Apr 07, 2010
Posts: 1043
|
|
What does the spec say?
There is no requirement in the specs that say that the session information should be kept when the server goes down. So you are lucky (or not) if it is still available....
Regards,
Frits
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
So, it's up to implementing the container? Then we nee to know this, that there are some container will restore the session and some are not. Please confirm!
|
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
|
 |
Parth Twari
Ranch Hand
Joined: Jan 20, 2010
Posts: 163
|
|
|
Yes, tomcat does not store sessions others may decide to store them in a database while they are restarted.
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
then, what about the browser side? Is it also depends on the browser?
|
 |
Parth Twari
Ranch Hand
Joined: Jan 20, 2010
Posts: 163
|
|
On browser its not about HttpSession its about cookies or about rewritten urls in the links you click.
So you can set your browser about how to deal with cookies and in case of links once the page is gone the appended jsessionid is gone as well.
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
Yea, thanks Parth, in browser side, it's cookie! Thanks!
|
 |
 |
|
|
subject: HttpSession
|
|
|