Tuesday, March 29, 2011

Java HttpSession

HttpSession is interface from package javax.servlet.http.

Getting HttpSession
A HttpSession object could be get by request.getSession( boolean create );

The most important methods are:
* Object getAttribute(java.lang.String name);
* Enumeration getAttributeNames();
* long getCreationTime();
* long getLastAccessedTime();
* ServletContext getServletContext();
* invalidate();
* removeAttribute(java.lang.String name);
* setAttribute( String name, Object value );
* setMaxInactiveInterval(int interval) - Specifies the time, in seconds;
*

No comments:

Post a Comment