Professional Documents
Culture Documents
Reqdisp
Reqdisp
HttpSession:-
It is an interface present in javax.servlet.http package.
It is used to identify a user.
By using session we can get the user login time or creation time and used for
invalidating the session.
HttpServletRequest provide method getSession( ) to get the reference of
HttpSession.
Syntax:
HttpSession ses = request.getSession();
&
HttpSession ses = request.getSession(boolean b);
Methods of HttpSession:-
*public void setAttribute(String key, object value)
*public object getAttribute(String key)
*public void invalidate()