org.apache.cocoon.environment.http
Class HttpRequest
java.lang.Object
org.apache.cocoon.environment.impl.AbstractRequest
org.apache.cocoon.environment.http.HttpRequest
- All Implemented Interfaces:
- HttpServletRequest, org.apache.cocoon.environment.Request, ServletRequest, org.apache.cocoon.environment.ValueHolder
- public final class HttpRequest
- extends AbstractRequest
Implements the Request
interface
to provide request information in the HTTP servlets environment.
- Version:
- $Id: HttpRequest.html 1304280 2012-03-23 11:18:01Z ilgrosso $
Fields inherited from interface org.apache.cocoon.environment.Request |
GLOBAL_SCOPE, REQUEST_SCOPE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reqURI
protected String reqURI
HttpRequest
protected HttpRequest(HttpServletRequest req,
HttpEnvironment env)
- Creates a HttpRequest based on a real HttpServletRequest object
- Parameters:
req
- The HttpServletReqeustenv
- The HttpEnvironment
get
public Object get(String name)
getAuthType
public String getAuthType()
getCookies
public Cookie[] getCookies()
getCookieMap
public Map getCookieMap()
getCocoonCookies
public org.apache.cocoon.environment.Cookie[] getCocoonCookies()
getCocoonCookieMap
public Map getCocoonCookieMap()
getDateHeader
public long getDateHeader(String name)
getHeader
public String getHeader(String name)
getHeaders
public Enumeration getHeaders(String name)
getHeaderNames
public Enumeration getHeaderNames()
getIntHeader
public int getIntHeader(String name)
- Specified by:
getIntHeader
in interface HttpServletRequest
- Overrides:
getIntHeader
in class AbstractRequest
getMethod
public String getMethod()
getPathInfo
public String getPathInfo()
getPathTranslated
public String getPathTranslated()
getContextPath
public String getContextPath()
getQueryString
public String getQueryString()
getRemoteUser
public String getRemoteUser()
isUserInRole
public boolean isUserInRole(String role)
getUserPrincipal
public Principal getUserPrincipal()
getRequestedSessionId
public String getRequestedSessionId()
getRequestURI
public String getRequestURI()
getSitemapURI
public String getSitemapURI()
getSitemapURIPrefix
public String getSitemapURIPrefix()
getSitemapPath
public String getSitemapPath()
getServletPath
public String getServletPath()
getSession
public HttpSession getSession(boolean create)
getSession
public HttpSession getSession()
getCocoonSession
public org.apache.cocoon.environment.Session getCocoonSession(boolean create)
getCocoonSession
public org.apache.cocoon.environment.Session getCocoonSession()
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
- Deprecated. As of Version 2.1 of the Java Servlet API, use
isRequestedSessionIdFromURL()
instead.
- Specified by:
isRequestedSessionIdFromUrl
in interface HttpServletRequest
- Overrides:
isRequestedSessionIdFromUrl
in class AbstractRequest
getAttribute
public Object getAttribute(String name)
getAttributeNames
public Enumeration getAttributeNames()
setAttribute
public void setAttribute(String name,
Object value)
removeAttribute
public void removeAttribute(String name)
getLocalAttribute
public Object getLocalAttribute(String name)
getLocalAttributeNames
public Enumeration getLocalAttributeNames()
setLocalAttribute
public void setLocalAttribute(String name,
Object value)
removeLocalAttribute
public void removeLocalAttribute(String name)
getCharacterEncoding
public String getCharacterEncoding()
setCharacterEncoding
public void setCharacterEncoding(String form_encoding)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
setContainerEncoding
public void setContainerEncoding(String container_encoding)
- Sets the default encoding of the servlet container.
- Parameters:
container_encoding
- The default form encoding of the servlet container.
getContentLength
public int getContentLength()
getContentType
public String getContentType()
getInputStream
public ServletInputStream getInputStream()
throws IOException
- Throws:
IOException
getParameter
public String getParameter(String name)
getParameterNames
public Enumeration getParameterNames()
getParameterValues
public String[] getParameterValues(String name)
getProtocol
public String getProtocol()
getScheme
public String getScheme()
getServerName
public String getServerName()
getServerPort
public int getServerPort()
getReader
public BufferedReader getReader()
throws IOException
- Specified by:
getReader
in interface ServletRequest
- Overrides:
getReader
in class AbstractRequest
- Throws:
IOException
getRemoteAddr
public String getRemoteAddr()
getRemoteHost
public String getRemoteHost()
getLocale
public Locale getLocale()
getLocales
public Enumeration getLocales()
isSecure
public boolean isSecure()
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String path)
- Specified by:
getRequestDispatcher
in interface ServletRequest
- Overrides:
getRequestDispatcher
in class AbstractRequest
getRealPath
public String getRealPath(String path)
- Deprecated. As of Version 2.1 of the Java Servlet API, use
ServletContext.getRealPath(java.lang.String)
instead.
- Specified by:
getRealPath
in interface ServletRequest
- Overrides:
getRealPath
in class AbstractRequest
searchAttribute
public Object searchAttribute(String name)
- See Also:
Request.searchAttribute(java.lang.String)
Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.