|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpSessionRequest
This represents session tracking information associated with a request in an HTTP-specific implementation of session tracking. This contains information about how the request was associated with that Session, including what session id was requested and how that id was requested.
This also contains methods for rewriting URL's so that they include the session ID if necessary.
This object is available as an attribute of the ServletRequest, and can be obtained by calling "getAttribute(HttpSessionRequest.ATTRIBUTE_NAME)". The name of the attribute is "javax.servlet.http.session-request".
HttpServletRequest
,
HttpServletResponse
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_NAME
Deprecated. The name of the attribute in a ServletRequest that will hold a SessionRequest. |
static java.lang.String |
CLASS_VERSION
Deprecated. |
Method Summary | |
---|---|
java.lang.String |
encodeRedirectURL(java.lang.String pURL)
Deprecated. This will return an "encoded" version of the specified URL for use in the "HttpServletResponse.sendRedirect" method. |
java.lang.String |
encodeURL(java.lang.String pURL)
Deprecated. This will return an "encoded" version of the specified URL, by including the session ID in the URL. |
java.lang.String |
encodeURL(java.lang.String pURL,
java.lang.String pSessionIdSpecifier)
Deprecated. This will return an "encoded" version of the specified URL, by including the session ID in the URL. |
java.lang.String |
getRequestedSessionId()
Deprecated. Returns the session id specified by this request, or null if the request did not specify a session id. |
javax.servlet.http.HttpSession |
getSession()
Deprecated. Returns the Session associated with this request. |
boolean |
isNewSession()
Deprecated. Returns true if this request the first request for the Session. |
boolean |
isRequestedSessionIdFromCookie()
Deprecated. Returns true if the session id specified by this request came in as a cookie. |
boolean |
isRequestedSessionIdFromURL()
Deprecated. Returns true if the session id specified by the request for this session came in as part of the URL. |
boolean |
isRequestedSessionIdInvalid()
Deprecated. Returns true if this request specified a session id for an invalid session. |
Field Detail |
---|
static final java.lang.String CLASS_VERSION
static final java.lang.String ATTRIBUTE_NAME
Method Detail |
---|
javax.servlet.http.HttpSession getSession()
boolean isNewSession()
java.lang.String getRequestedSessionId()
isRequestedSessionIdInvalid()
boolean isRequestedSessionIdInvalid()
getRequestedSessionId()
boolean isRequestedSessionIdFromCookie()
boolean isRequestedSessionIdFromURL()
java.lang.String encodeURL(java.lang.String pURL)
This will return an "encoded" version of the specified URL, by including the session ID in the URL. The implementation of this method should include the logic to determine if the session ID needs to be encoded in the URL or not. For example, if the browser supports cookies, or Session Tracking is turned off, URL encoding is probably unnecessary. In cases where the encoding is not needed, the URL will be returned without modification.
All URL's emitted by a Servlet should be run through this method.
java.lang.String encodeURL(java.lang.String pURL, java.lang.String pSessionIdSpecifier)
This will return an "encoded" version of the specified URL, by including the session ID in the URL. The implementation of this method should include the logic to determine if the session ID needs to be encoded in the URL or not. For example, if the browser supports cookies, or Session Tracking is turned off, URL encoding is probably unnecessary. In cases where the encoding is not needed, the URL will be returned without modification.
All URL's emitted by a Servlet should be run through this method.
The specified session ID specifier is used if the session ID needs to be encoded in the URL instead of the default session ID specifier.
java.lang.String encodeRedirectURL(java.lang.String pURL)
This will return an "encoded" version of the specified URL for use in the "HttpServletResponse.sendRedirect" method. Like "encodeURL" this may or may not decide to include the session ID in a URL. The reason this is a separate method is that the rules for making this determination are different for a redirect command and a normal link.
All URL's sent to the "HttpServletResponse.sendRedirect" method should be run through this method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |