|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.w3c.jigsaw.servlet.JigsawHttpServletRequest
public class JigsawHttpServletRequest
| Field Summary | |
|---|---|
protected java.lang.String |
encoding
|
protected JigsawHttpSession |
httpSession
|
protected javax.servlet.ServletInputStream |
is
|
protected java.io.BufferedReader |
reader
|
protected java.lang.String |
requestedSessionID
|
protected JigsawHttpServletResponse |
response
|
protected JigsawHttpSessionContext |
sessionContext
|
static java.lang.String |
STATE_PARAMETERS
|
| Method Summary | |
|---|---|
protected javax.servlet.http.Cookie |
convertCookie(HttpCookie httpCookie)
|
protected javax.servlet.http.Cookie |
createCookie()
|
java.lang.Object |
getAttribute(java.lang.String name)
ServletRequest implementation - Get an attribute of the request. |
java.util.Enumeration |
getAttributeNames()
|
java.lang.String |
getAuthType()
HttpServletRequest implementation - Get the request's auth method. |
java.lang.String |
getCharacterEncoding()
Return the Charset parameter of content type |
int |
getContentLength()
ServletRequest implementation - Get the length of request data. |
java.lang.String |
getContentType()
ServletRequest implementation - Get the type of the request's body. |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request. |
protected java.lang.String |
getCookieName()
|
javax.servlet.http.Cookie[] |
getCookies()
Gets the array of cookies found in this request. |
long |
getDateHeader(java.lang.String name)
HttpServletRequest implementation - Get a request header as an date. |
java.lang.String |
getHeader(java.lang.String name)
HttpServletRequest implementation - Get a request header as a String. |
java.util.Enumeration |
getHeaderNames()
HttpServletRequest implementation - Get a all header names. |
java.util.Enumeration |
getHeaders(java.lang.String name)
Returns all the values of the specified request header as an Enumeration of String objects. |
javax.servlet.ServletInputStream |
getInputStream()
Returns an input stream for reading binary data in the request body. |
int |
getIntHeader(java.lang.String name)
HttpServletRequest implementation - Get a request header as an int. |
protected javax.servlet.ServletInputStream |
getJigsawInputStream()
|
java.util.Locale |
getLocale()
Returns the preferred Locale that the client will
accept content in, based on the Accept-Language header. |
java.util.Enumeration |
getLocales()
Returns an Enumeration of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header. |
java.lang.String |
getMethod()
HttpServletRequest implementation - Get the request's method. |
java.lang.String |
getParameter(java.lang.String name)
ServletRequest implementation - Get a parameter value. |
java.util.Map |
getParameterMap()
ServletRequest implementation - Get a parameter value. |
java.util.Enumeration |
getParameterNames()
ServletRequest implementation - List available parameters. |
java.lang.String[] |
getParameterValues(java.lang.String parameter)
ServletRequest implementation - Get the parameters value. |
java.lang.String |
getPathInfo()
HttpServletRequest implementation - Get the request's path info. |
java.lang.String |
getPathTranslated()
HttpServletRequest implementation - Get the request's path translated. |
java.lang.String |
getProtocol()
ServletRequest implementation - Get the protocol of that request. |
java.lang.String |
getQueryString()
HttpServletRequest implementation - Get the request's query string. |
java.io.BufferedReader |
getReader()
Returns a buffered reader for reading text in the request body. |
java.lang.String |
getRealPath(java.lang.String name)
Deprecated. since jsdk1.2 |
java.lang.String |
getRemoteAddr()
ServletRequest implementation - Get the IP address of requests's sender. |
java.lang.String |
getRemoteHost()
ServletRequest implementation - FQDN of request's sender. |
java.lang.String |
getRemoteUser()
HttpServletRequest implementation - Get the request's user (if any). |
protected Request |
getRequest()
Get the wrapped Jigsaw Request. |
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String path)
Returns a RequestDispatcher object that acts as a wrapper for
the resource located at the given path. |
java.lang.String |
getRequestedSessionId()
Gets the session id specified with this request. |
protected java.lang.String |
getRequestedSessionIdFromCookie()
|
protected java.lang.String |
getRequestedSessionIdFromURL()
|
java.lang.String |
getRequestURI()
Gets, from the first line of the HTTP request, the part of this request's URI that is to the left of any query string. |
java.lang.StringBuffer |
getRequestURL()
Gets, from the first line of the HTTP request, the part of this request's URI that is to the left of any query string. |
java.lang.String |
getScheme()
|
protected httpd |
getServer()
|
java.lang.String |
getServerName()
ServletRequest implementation - Get the name of queried server. |
int |
getServerPort()
ServletRequest implementation - Get the port of queried server. |
java.lang.String |
getServletPath()
Gets the part of this request's URI that refers to the servlet being invoked. |
javax.servlet.http.HttpSession |
getSession()
Gets the current valid session associated with this request. |
javax.servlet.http.HttpSession |
getSession(boolean create)
Gets the current valid session associated with this request, if create is false or, if necessary, creates a new session for the request, if create is true. |
protected javax.servlet.http.HttpSession |
getSession(java.lang.String sessionId)
|
protected JigsawHttpSessionContext |
getSessionContext()
|
protected java.lang.String |
getURLParameter(java.lang.String name)
|
java.security.Principal |
getUserPrincipal()
Returns a java.security.Principal object containing
the name of the current authenticated user. |
boolean |
hasQueryString()
|
boolean |
isRequestedSessionIdFromCookie()
Checks whether the session id specified by this request came in as a cookie. |
boolean |
isRequestedSessionIdFromUrl()
Deprecated. since jsdk2.1 |
boolean |
isRequestedSessionIdFromURL()
Checks whether the session id specified by this request came in as part of the URL. |
boolean |
isRequestedSessionIdValid()
Checks whether this request is associated with a session that is valid in the current session context. |
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
boolean |
isUserInRole(java.lang.String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role". |
void |
removeAttribute(java.lang.String name)
Removes an attribute from this request. |
void |
setAttribute(java.lang.String name,
java.lang.Object object)
|
void |
setCharacterEncoding(java.lang.String enc)
Overrides the name of the character encoding used in the body of this request ServletRequest implementation - version 2.3 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STATE_PARAMETERS
protected JigsawHttpServletResponse response
protected JigsawHttpSession httpSession
protected JigsawHttpSessionContext sessionContext
protected java.lang.String requestedSessionID
protected java.lang.String encoding
protected javax.servlet.ServletInputStream is
protected java.io.BufferedReader reader
| Method Detail |
|---|
protected java.lang.String getURLParameter(java.lang.String name)
public java.lang.String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequest
public void setCharacterEncoding(java.lang.String enc)
throws java.io.UnsupportedEncodingException
enc, - a String specifying the encoding String
java.io.UnsupportedEncodingExceptionpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestpublic java.lang.String getContentType()
getContentType in interface javax.servlet.ServletRequestpublic java.lang.String getProtocol()
getProtocol in interface javax.servlet.ServletRequestprotected httpd getServer()
public java.lang.String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteAddr()
getRemoteAddr in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequestpublic java.lang.String getRealPath(java.lang.String name)
getRealPath in interface javax.servlet.ServletRequest
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.servlet.ServletRequestjava.lang.IllegalStateException - if getReader has been called on
this same request.
java.io.IOException - on other I/O related errors.getReader()
protected javax.servlet.ServletInputStream getJigsawInputStream()
throws java.io.IOException
java.io.IOException - if an IO error occurspublic java.lang.String getParameter(java.lang.String name)
getParameter in interface javax.servlet.ServletRequestpublic java.util.Map getParameterMap()
public java.lang.String[] getParameterValues(java.lang.String parameter)
getParameterValues in interface javax.servlet.ServletRequestpublic java.util.Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.ServletRequestname - The name of the attribute.
public void setAttribute(java.lang.String name,
java.lang.Object object)
setAttribute in interface javax.servlet.ServletRequestpublic void removeAttribute(java.lang.String name)
Attribute names should follow the same conventions as
package names. Names beginning with java.*,
javax.*, and com.sun.*, are
reserved for use by Sun Microsystems.
removeAttribute in interface javax.servlet.ServletRequestname - a String specifying
the name of the attribute to removepublic java.util.Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.ServletRequestpublic java.util.Locale getLocale()
Locale that the client will
accept content in, based on the Accept-Language header.
If the client request doesn't provide an Accept-Language header,
this method returns the default locale for the server.
getLocale in interface javax.servlet.ServletRequestLocale for the clientpublic java.util.Enumeration getLocales()
Enumeration of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header.
If the client request doesn't provide an Accept-Language header,
this method returns an Enumeration containing one
Locale, the default locale for the server.
getLocales in interface javax.servlet.ServletRequestEnumeration of preferred
Locale objects for the clientpublic boolean isSecure()
isSecure in interface javax.servlet.ServletRequestpublic java.lang.String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getPathInfo()
getPathInfo in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getPathTranslated()
getPathTranslated in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getContextPath()
getContextPath in interface javax.servlet.http.HttpServletRequestString specifying the portion of the request
URI that indicates the context of the requestpublic boolean hasQueryString()
public java.lang.String getQueryString()
getQueryString in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestpublic boolean isUserInRole(java.lang.String role)
false.
isUserInRole in interface javax.servlet.http.HttpServletRequestrole - a String specifying the name of the role
boolean indicating whether the user making this
request belongs to a given role; false if the user has not
been authenticatedpublic java.security.Principal getUserPrincipal()
java.security.Principal object containing
the name of the current authenticated user. If the user has not been
authenticated, the method returns null.
getUserPrincipal in interface javax.servlet.http.HttpServletRequestjava.security.Principal containing
the name of the user making this request; null if the
user has not been authenticatedpublic java.lang.String getAuthType()
getAuthType in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.HttpServletRequestpublic java.util.Enumeration getHeaders(java.lang.String name)
Enumeration of String objects.
Some headers, such as Accept-Language can be sent
by clients as several headers each with a different value rather than
sending the header as a comma separated list.
WARNING, this can't happen with Jigsaw, all multiple values are grouped in one, and only one, header. So, this method always return ONE header value.
If the request did not include any headers
of the specified name, this method returns an empty
Enumeration.
The header name is case insensitive. You can use
this method with any request header.
getHeaders in interface javax.servlet.http.HttpServletRequestname - a String specifying the header name
Enumeration containing the values of the
requested header, or null if the request does not
have any headers of that namepublic int getIntHeader(java.lang.String name)
getIntHeader in interface javax.servlet.http.HttpServletRequestpublic long getDateHeader(java.lang.String name)
getDateHeader in interface javax.servlet.http.HttpServletRequestpublic java.util.Enumeration getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRequestURI()
getRequestURI in interface javax.servlet.http.HttpServletRequestpublic java.lang.StringBuffer getRequestURL()
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
RequestDispatcher object that acts as a wrapper for
the resource located at the given path.
A RequestDispatcher object can be used to forward
a request to the resource or to include the resource in a response.
The resource can be dynamic or static.
The pathname specified may be relative, although it cannot extend
outside the current servlet context. If the path begins with
a "/" it is interpreted as relative to the current context root.
This method returns null if the servlet container
cannot return a RequestDispatcher.
The difference between this method and ServletContext.getRequestDispatcher(java.lang.String) is that this method can take a
relative path.
getRequestDispatcher in interface javax.servlet.ServletRequestpath - a String specifying the pathname
to the resource
RequestDispatcher object that acts as a
wrapper for the resource at the specified pathRequestDispatcher,
ServletContext.getRequestDispatcher(java.lang.String)public java.lang.String getServletPath()
getServletPath in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getScheme()
getScheme in interface javax.servlet.ServletRequestpublic javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestprotected javax.servlet.http.Cookie convertCookie(HttpCookie httpCookie)
protected java.lang.String getRequestedSessionIdFromCookie()
protected java.lang.String getRequestedSessionIdFromURL()
public java.lang.String getRequestedSessionId()
getRequestedSessionId in interface javax.servlet.http.HttpServletRequestprotected JigsawHttpSessionContext getSessionContext()
public javax.servlet.http.HttpSession getSession(boolean create)
getSession in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession()
getSession in interface javax.servlet.http.HttpServletRequestprotected java.lang.String getCookieName()
protected javax.servlet.http.Cookie createCookie()
protected javax.servlet.http.HttpSession getSession(java.lang.String sessionId)
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequest
public java.io.BufferedReader getReader()
throws java.io.IOException
getReader in interface javax.servlet.ServletRequestjava.io.UnsupportedEncodingException - if the character set encoding
is unsupported, so the text can't be correctly decoded.
java.lang.IllegalStateException - if getInputStream has been called on
this same request.
java.io.IOException - on other I/O related errors.getInputStream()protected Request getRequest()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||