Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query about session ?

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is session (Java)?
Will session get expired when user open a new window(Browser) ?
Will session get expired when user open a new window by clicking on file >> New Window ?

Want to know everything about session... including some defination...

Can anybody explain about it or send me some link ???
 
Srikkanth Mohanasundaram
Ranch Hand
Posts: 242
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You need a session when you need to maintain the conversational state of the Client across multiple requests.You can create a HttpSession object for every clent accessing your application,and put some Conversational information as attributes in the session.

Regarding timeout the behavior can be provided by you declaratively(in web.xml) or you can use HttpSession APi methods(for example HttpSession.setMaxInactiveInterval(second))

Thanks,
Srikkanth.M
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jigar Naik:
What is session (Java)?
Will session get expired when user open a new window(Browser) ?
Will session get expired when user open a new window by clicking on file >> New Window ?

Want to know everything about session... including some defination...



Core java do not have anything like session , but there is HTTPSession.

HTTPSession has nothing to do with browser close and opening a new window.

Servlet specification has complete description of HTTPSession.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jigar Naik:
...
Want to know everything about session... including some defination...
Can anybody explain about it or send me some link ???


There is a link to the Servlet Spec in my signature.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic