Name
session
Synopsis
|
Variable Name: |
session |
|
Interface Name: |
javax.servlet.http.HttpSession |
|
Extends: |
None |
|
Implemented by: |
Internal container-dependent class |
|
JSP Page Type: |
Available in both regular JSP pages and error pages, unless the
|
Description
The session variable is assigned a reference to
the HttpSession object that represents the current
client session. Information stored as HttpSession
attributes corresponds to objects in the JSP session scope.
By default, the session persists for a time period specified in the web application deployment descriptor, across more than one page request from the user. The container can maintain a session in many ways, such as using cookies or rewriting URLs.
Interface Declarations
public interface HttpSession {
public Object getAttribute(String name);
public java.util.Enumeration getAttributeNames( );
public long getCreationTime( );
public String getId( );
public long getLastAccessedTime( );
public int getMaxInactiveInterval( );
public void invalidate( );
public boolean isNew( );
public void removeAttribute(String name);
public void setAttribute(String name, Object attribute);
public void setMaxInactiveInterval(int interval);
// Deprecated methods
public HttpSessionContext getSessionContext( );
public Object getValue(String name);
public String[] getValueNames( );
public void putValue(String name, Object value);
public void removeValue(String name);
}Methods
-
public Object getAttribute(String ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access