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))
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.