|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.jigsaw.servlet.JigsawHttpServletRequest
Field Summary | |
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.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.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 |
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)
|
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 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()
public int getContentLength()
public java.lang.String getContentType()
public java.lang.String getProtocol()
protected httpd getServer()
public java.lang.String getServerName()
public int getServerPort()
public java.lang.String getRemoteAddr()
public java.lang.String getRemoteHost()
public java.lang.String getRealPath(java.lang.String name)
public javax.servlet.ServletInputStream getInputStream() throws java.io.IOException
getReader()
protected javax.servlet.ServletInputStream getJigsawInputStream() throws java.io.IOException
public java.lang.String getParameter(java.lang.String name)
public java.lang.String[] getParameterValues(java.lang.String parameter)
public java.util.Enumeration getParameterNames()
public java.lang.Object getAttribute(java.lang.String name)
name
- The name of the attribute.public void setAttribute(java.lang.String name, java.lang.Object object)
public 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.
name
- a String
specifying
the name of the attribute to removepublic java.util.Enumeration getAttributeNames()
public 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.Locale
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.Enumeration
of preferred
Locale
objects for the clientpublic boolean isSecure()
public java.lang.String getMethod()
public java.lang.String getPathInfo()
public java.lang.String getPathTranslated()
public java.lang.String getContextPath()
String
specifying the portion of the request
URI that indicates the context of the requestpublic java.lang.String getQueryString()
public java.lang.String getRemoteUser()
public boolean isUserInRole(java.lang.String role)
false
.role
- a String
specifying the name of the roleboolean
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
.java.security.Principal
containing
the name of the user making this request; null
if the
user has not been authenticatedpublic java.lang.String getAuthType()
public java.lang.String getHeader(java.lang.String name)
public 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.
name
- a String
specifying the header nameEnumeration
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)
public long getDateHeader(java.lang.String name)
public java.util.Enumeration getHeaderNames()
public java.lang.String getRequestURI()
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.
path
- a String
specifying the pathname
to the resourceRequestDispatcher
object that acts as a
wrapper for the resource at the specified pathRequestDispatcher
,
ServletContext.getRequestDispatcher(java.lang.String)
public java.lang.String getServletPath()
public java.lang.String getScheme()
public javax.servlet.http.Cookie[] getCookies()
protected javax.servlet.http.Cookie convertCookie(HttpCookie httpCookie)
protected java.lang.String getRequestedSessionIdFromCookie()
protected java.lang.String getRequestedSessionIdFromURL()
public java.lang.String getRequestedSessionId()
protected JigsawHttpSessionContext getSessionContext()
public javax.servlet.http.HttpSession getSession(boolean create)
public javax.servlet.http.HttpSession getSession()
protected java.lang.String getCookieName()
protected javax.servlet.http.Cookie createCookie()
protected javax.servlet.http.HttpSession getSession(java.lang.String sessionId)
public boolean isRequestedSessionIdValid()
public boolean isRequestedSessionIdFromCookie()
public boolean isRequestedSessionIdFromUrl()
public boolean isRequestedSessionIdFromURL()
public java.io.BufferedReader getReader() throws java.io.IOException
getInputStream()
protected Request getRequest()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |