img
Method
Description
String getAuthType( )
Returns authentication scheme.
Cookie[ ] getCookies( )
Returns an array of the cookies in this request.
long getDateHeader(String field)
Returns the value of the date header field named field.
String getHeader(String field)
Returns the value of the header field named field.
Enumeration getHeaderNames( )
Returns an enumeration of the header names.
int getIntHeader(String field)
Returns the int equivalent of the header field named field.
String getMethod( )
Returns the HTTP method for this request.
String getPathInfo( )
Returns any path information that is located after the ser vlet path
and before a quer y string of the URL.
String getPathTranslated( )
Returns any path information that is located after the ser vlet path
and before a quer y string of the URL after translating it to a real
path.
String getQuer yString( )
Returns any quer y string in the URL.
String getRemoteUser( )
Returns the name of the user who issued this request.
String getRequestedSessionId( )
Returns the ID of the session.
String getRequestURI( )
Returns the URI.
StringBuf fer getRequestURL( )
Returns the URL.
String getSer vletPath( )
Returns that par t of the URL that identifies the ser vlet.
HttpSession getSession( )
Returns the session for this request. If a session does not exist,
one is created and then returned.
HttpSession getSession(boolean new)
If new is true and no session exists, creates and returns a session
for this request. Other wise, returns the existing session for this
request.
boolean
Returns true if a cookie contains the session ID. Other wise, returns
isRequestedSessionIdFromCookie( ) false.
boolean
Returns true if the URL contains the session ID. Other wise, returns
isRequestedSessionIdFromURL( )
false.
boolean isRequestedSessionIdValid( )
Returns true if the requested session ID is valid in the current
session context.
TABLE 31-5
Various Methods Defined by HttpServletRequest
Method
Description
void addCookie(Cookie cookie)
Adds cookie to the HTTP response.
boolean containsHeader(String field)
Returns true if the HTTP response header contains a field
named field.
String encodeURL(String url)
Determines if the session ID must be encoded in the URL
identified as url. If so, returns the modified version of url.
Other wise, returns url. All URLs generated by a ser vlet should
be processed by this method.
String encodeRedirectURL(String url)
Determines if the session ID must be encoded in the URL
identified as url. If so, returns the modified version of url.
Other wise, returns url. All URLs passed to sendRedirect( )
should be processed by this method.
TABLE 31-6
Various Methods Defined by HttpServletResponse
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home