|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.portal.generic.HttpPortletRequestDispatcher.HttpPortletRequestWrapper
protected static class HttpPortletRequestDispatcher.HttpPortletRequestWrapper
This can't extend HttpServletRequestWrapper because of some bizarre behaviour mandated by the Servlet spec.
| Field Summary |
|---|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
HttpPortletRequestDispatcher.HttpPortletRequestWrapper()
|
|
| Method Summary | |
|---|---|
void |
complete()
Complete the request |
void |
finish()
|
java.lang.Object |
getAttribute(java.lang.String name)
Returns an attribute value. |
java.util.Enumeration |
getAttributeNames()
Enumerates all attribute names in the request. |
java.lang.String |
getAuthType()
Returns the auth type, i.e. |
java.lang.String |
getCharacterEncoding()
Returns the character encoding of the POSTed data. |
int |
getContentLength()
Returns the content length of the data. |
java.lang.String |
getContentType()
Returns the request's mime-type. |
java.lang.String |
getContextPath()
Returns the part of the URI corresponding to the application's prefix. |
Cookie[] |
getCookies()
Returns an array of all cookies sent by the client. |
long |
getDateHeader(java.lang.String name)
Converts a date header to milliseconds since the epoch. |
java.lang.String |
getHeader(java.lang.String name)
Returns the first value for a request header. |
java.util.Enumeration |
getHeaderNames()
Returns an enumeration of all headers sent by the client. |
java.util.Enumeration |
getHeaders(java.lang.String name)
Returns all the values for a request header. |
ServletInputStream |
getInputStream()
Returns an InputStream to retrieve POST data from the request. |
int |
getIntHeader(java.lang.String name)
Converts a header value to an integer. |
java.lang.String |
getLocalAddr()
This call returns the ip of the host actually used to connect to the Resin server, which means that if ipchains, load balancing, or proxying is involved this call does not return the correct host for forming urls. |
java.util.Locale |
getLocale()
Returns the request's preferred locale, based on the Accept-Language header. |
java.util.Enumeration |
getLocales()
Returns an enumeration of all locales acceptable by the client. |
java.lang.String |
getLocalName()
Returns the IP address of the local host, i.e. |
int |
getLocalPort()
Returns the port of the local host. |
java.lang.String |
getMethod()
Returns the HTTP method, e.g. |
java.lang.String |
getParameter(java.lang.String name)
Returns a form parameter. |
java.util.Map |
getParameterMap()
Returns a Map of the form parameters. |
java.util.Enumeration |
getParameterNames()
Returns an enumeration of all form parameter names. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns all values of a form parameter. |
java.lang.String |
getPathInfo()
Returns the URI part after the selected servlet and null if there is no suffix. |
java.lang.String |
getPathTranslated()
Returns the physical path name for the path info. |
java.lang.String |
getProtocol()
Returns the prococol, e.g. |
java.lang.String |
getQueryString()
Returns the request's query string. |
java.io.BufferedReader |
getReader()
Returns a reader to read POSTed data. |
java.lang.String |
getRealPath(java.lang.String uri)
Returns the path of the URI. |
java.lang.String |
getRemoteAddr()
Returns the IP address of the remote host, i.e. |
java.lang.String |
getRemoteHost()
Returns the DNS hostname of the remote host, i.e. |
int |
getRemotePort()
Returns the port of the remote host, i.e. |
java.lang.String |
getRemoteUser()
Returns the remote user if authenticated. |
RequestDispatcher |
getRequestDispatcher(java.lang.String uri)
Returns a request dispatcher for later inclusion or forwarding. |
java.lang.String |
getRequestedSessionId()
Returns the session id. |
java.lang.String |
getRequestURI()
Returns the entire request URI |
java.lang.StringBuffer |
getRequestURL()
Reconstructs the URL the client used for the request. |
java.lang.String |
getScheme()
Returns the request scheme, e.g. |
java.lang.String |
getServerName()
Returns the server name handling the request. |
int |
getServerPort()
Returns the server port used by the client, e.g. |
ServletContext |
getServletContext()
Returns the servlet context for the request |
java.lang.String |
getServletPath()
Returns the URI part corresponding to the selected servlet. |
ServletResponse |
getServletResponse()
Returns the servlet response for the request |
HttpSession |
getSession()
Returns the current session, creating one if necessary. |
HttpSession |
getSession(boolean create)
Returns a session. |
java.security.Principal |
getUserPrincipal()
Returns the equivalent principal object for the authenticated user. |
boolean |
isInitial()
Returns true for the initial dispatch |
boolean |
isRequestedSessionIdFromCookie()
Returns true if the session came from a cookie. |
boolean |
isRequestedSessionIdFromUrl()
Deprecated. |
boolean |
isRequestedSessionIdFromURL()
Returns true if the session came URL-encoding. |
boolean |
isRequestedSessionIdValid()
Returns true if the session is valid. |
boolean |
isResumed()
Returns true if the servlet is resumed |
boolean |
isSecure()
Returns true if the connection is secure, e.g. |
boolean |
isSuspended()
Returns true if the servlet is suspended |
boolean |
isTimeout()
Returns true if the servlet timed out |
boolean |
isUserInRole(java.lang.String role)
Returns true if the user is in the given role. |
void |
removeAttribute(java.lang.String name)
Removes the given attribute. |
void |
resume()
Resume the request |
void |
setAttribute(java.lang.String name,
java.lang.Object o)
Sets an attribute value. |
void |
setCharacterEncoding(java.lang.String encoding)
Overrides the character encoding specified in the request. |
void |
start(HttpServletRequest httpRequest,
RenderRequest renderRequest,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
|
void |
suspend()
Suspend the request |
void |
suspend(long timeout)
Suspend the request |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpPortletRequestDispatcher.HttpPortletRequestWrapper()
| Method Detail |
|---|
public void start(HttpServletRequest httpRequest,
RenderRequest renderRequest,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
public void finish()
public java.lang.String getParameter(java.lang.String name)
ServletRequestgetParameter returns the first.
For example, calling getParameter("a") with the
the query string a=1&a=2 will return "1".
getParameter in interface ServletRequestname - the form parameter to return
public java.lang.String[] getParameterValues(java.lang.String name)
ServletRequestFor example, calling getParameterValues("a")
with the the query string a=1&a=2 will
return ["1", "2"].
getParameterValues in interface ServletRequestname - the form parameter to return
public java.util.Map getParameterMap()
ServletRequestgetParameterNames
and the values are String arrays as returned by
getParameterValues.
getParameterMap in interface ServletRequestpublic java.util.Enumeration getParameterNames()
ServletRequest
Enumeration e = request.getParameterNames();
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
out.println(name + ": " + request.getParameter(name));
}
getParameterNames in interface ServletRequestpublic java.lang.String getScheme()
ServletRequest
getScheme in interface ServletRequestpublic java.lang.String getServerName()
ServletRequest
getServerName in interface ServletRequestpublic int getServerPort()
ServletRequestServletRequest.isSecure() is provided for that purpose.
getServerPort in interface ServletRequestpublic java.lang.Object getAttribute(java.lang.String name)
ServletRequest
getAttribute in interface ServletRequestname - the attribute name
public void setAttribute(java.lang.String name,
java.lang.Object o)
ServletRequest
setAttribute in interface ServletRequestname - the attribute nameo - the attribute valuepublic java.util.Enumeration getAttributeNames()
ServletRequest
getAttributeNames in interface ServletRequestpublic void removeAttribute(java.lang.String name)
ServletRequest
removeAttribute in interface ServletRequestname - the attribute namepublic java.util.Locale getLocale()
ServletRequest
getLocale in interface ServletRequestpublic java.util.Enumeration getLocales()
ServletRequest
getLocales in interface ServletRequestpublic boolean isSecure()
ServletRequest
isSecure in interface ServletRequestpublic java.lang.String getAuthType()
HttpServletRequest
getAuthType in interface HttpServletRequestpublic java.lang.String getRequestedSessionId()
HttpServletRequest
getRequestedSessionId in interface HttpServletRequestpublic boolean isRequestedSessionIdValid()
HttpServletRequest
isRequestedSessionIdValid in interface HttpServletRequestpublic java.lang.String getRemoteUser()
HttpServletRequest
getRemoteUser in interface HttpServletRequestpublic boolean isUserInRole(java.lang.String role)
HttpServletRequest
isUserInRole in interface HttpServletRequestpublic java.security.Principal getUserPrincipal()
HttpServletRequest
getUserPrincipal in interface HttpServletRequestpublic java.lang.String getHeader(java.lang.String name)
HttpServletRequestHTTP_*
String userAgent = request.getHeader("User-Agent");
getHeader in interface HttpServletRequestname - the header name
public java.util.Enumeration getHeaders(java.lang.String name)
HttpServletRequest
getHeaders in interface HttpServletRequestname - the header name
public java.util.Enumeration getHeaderNames()
HttpServletRequest
getHeaderNames in interface HttpServletRequestpublic int getIntHeader(java.lang.String name)
HttpServletRequest
getIntHeader in interface HttpServletRequestname - the header name
public long getDateHeader(java.lang.String name)
HttpServletRequest
long mod = request.getDateHeader("If-Modified-Since");
getDateHeader in interface HttpServletRequestname - the header name
public Cookie[] getCookies()
HttpServletRequest
getCookies in interface HttpServletRequestpublic java.lang.String getProtocol()
ServletRequest
getProtocol in interface ServletRequestpublic java.lang.String getRealPath(java.lang.String uri)
ServletRequest
getRealPath in interface ServletRequestpublic java.lang.StringBuffer getRequestURL()
HttpServletRequest
getRequestURL in interface HttpServletRequestpublic java.lang.String getRemoteAddr()
ServletRequest
getRemoteAddr in interface ServletRequestpublic java.lang.String getRemoteHost()
ServletRequest
getRemoteHost in interface ServletRequestpublic java.lang.String getCharacterEncoding()
ServletRequest
getCharacterEncoding in interface ServletRequest
public void setCharacterEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
ServletRequestsetCharacterEncoding must be called before calling
getReader or reading any parameters.
setCharacterEncoding in interface ServletRequestjava.io.UnsupportedEncodingException
public ServletInputStream getInputStream()
throws java.io.IOException
ServletRequest
getInputStream in interface ServletRequestjava.io.IOException
public java.io.BufferedReader getReader()
throws java.io.IOException,
java.lang.IllegalStateException
ServletRequestgetCharacterEncoding()
getReader in interface ServletRequestjava.io.IOException
java.lang.IllegalStateExceptionpublic int getContentLength()
ServletRequestThe upshot is, rely on the input stream to end when the data completes.
getContentLength in interface ServletRequestpublic java.lang.String getMethod()
HttpServletRequestREQUEST_METHOD
getMethod in interface HttpServletRequestpublic int getRemotePort()
ServletRequest
getRemotePort in interface ServletRequestpublic java.lang.String getLocalAddr()
ServletRequest
getLocalAddr in interface ServletRequestpublic java.lang.String getLocalName()
ServletRequest
getLocalName in interface ServletRequestpublic int getLocalPort()
ServletRequestServletRequest.isSecure() is provided for that purpose.
getLocalPort in interface ServletRequestpublic java.lang.String getContentType()
ServletRequest
getContentType in interface ServletRequestpublic RequestDispatcher getRequestDispatcher(java.lang.String uri)
ServletRequesturi
is relative to the request URI. Absolute URIs are relative to
the application prefix (getContextPath()).
If getRequestURI() is /myapp/dir/test.jsp and the
uri is "inc.jsp", the resulting page is
/myapp/dir/inc.jsp.
RequestDispatcher disp;
disp = getRequestDispatcher("inc.jsp?a=b");
disp.include(request, response);
getRequestDispatcher in interface ServletRequesturi - path relative to getRequestURI()
(including query string) for the included file.
public java.lang.String getRequestURI()
HttpServletRequest
getRequestURI in interface HttpServletRequestpublic java.lang.String getContextPath()
HttpServletRequestgetContextPath() is /myapp for the uri
/myapp/servlet/Hello,
getContextPath in interface HttpServletRequestpublic java.lang.String getServletPath()
HttpServletRequestSCRIPT_NAME
getServletPath() is /servlet/Hello for the uri
/myapp/servlet/Hello/foo.
getServletPath() is /dir/hello.jsp
for the uri /myapp/dir/hello.jsp/foo,
getServletPath in interface HttpServletRequestpublic java.lang.String getPathInfo()
HttpServletRequestPATH_INFO
getPathInfo() is /foo for
the uri /myapp/servlet/Hello/foo.
getPathInfo() is /hello.jsp for for the uri
/myapp/dir/hello.jsp/foo.
getPathInfo in interface HttpServletRequestpublic java.lang.String getPathTranslated()
HttpServletRequestPATH_TRANSLATED
getPathTranslated in interface HttpServletRequestpublic java.lang.String getQueryString()
HttpServletRequestServletRequest.getParameter() to decode the form values.
Corresponds to CGI's PATH_TRANSLATED
getQueryString in interface HttpServletRequestpublic HttpSession getSession(boolean create)
HttpServletRequest
getSession in interface HttpServletRequestcreate - If true, then create a new session if none exists.public HttpSession getSession()
HttpServletRequest
getSession in interface HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
HttpServletRequest
isRequestedSessionIdFromCookie in interface HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
HttpServletRequest
isRequestedSessionIdFromURL in interface HttpServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface HttpServletRequestpublic ServletContext getServletContext()
getServletContext in interface ServletRequestpublic ServletResponse getServletResponse()
getServletResponse in interface ServletRequestpublic void suspend(long timeout)
suspend in interface ServletRequestpublic void suspend()
suspend in interface ServletRequestpublic void resume()
resume in interface ServletRequestpublic void complete()
complete in interface ServletRequestpublic boolean isSuspended()
isSuspended in interface ServletRequestpublic boolean isResumed()
isResumed in interface ServletRequestpublic boolean isTimeout()
isTimeout in interface ServletRequestpublic boolean isInitial()
isInitial in interface ServletRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||