Package rife.servlet
Class HttpRequest
java.lang.Object
rife.servlet.HttpRequest
- All Implemented Interfaces:
Request
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) getBody()Retrieves the body of this request as a string.byte[]Retrieves the body of this request as a byte array.Retrieves a cookie.Cookie[]longgetDateHeader(String name) Retrieves an uploaded file.getFiles()Retrieves the files that were uploaded in this request.Retrieves all files that have been uploaded for a particular name.getHeaders(String name) Retrieves the underlyingHttpServletRequest.intgetIntHeader(String name) Retrieves the parameters that were sent in this request.intgetServerRootUrl(int port) Returns the root URL of the server that is running this web applications.getSession(boolean create) booleanhasAttribute(String name) Checks if a request attribute exists.booleanChecks whether a cookie is present.booleanChecks if a particular file has been uploaded in this request.voidinit()booleanisSecure()voidremoveAttribute(String name) voidsetAttribute(String name, Object object)
-
Constructor Details
-
HttpRequest
- Throws:
EngineException
-
-
Method Details
-
init
public void init() -
getMethod
Description copied from interface:Request -
getParameters
Description copied from interface:RequestRetrieves the parameters that were sent in this request.- Specified by:
getParametersin interfaceRequest- Returns:
- a
Mapwith all the parameter names and values
-
getBody
Description copied from interface:RequestRetrieves the body of this request as a string. -
getBodyAsBytes
public byte[] getBodyAsBytes()Description copied from interface:RequestRetrieves the body of this request as a byte array.- Specified by:
getBodyAsBytesin interfaceRequest- Returns:
- the byte array of the request body
- See Also:
-
getFiles
Description copied from interface:RequestRetrieves the files that were uploaded in this request. -
hasFile
Description copied from interface:RequestChecks if a particular file has been uploaded in this request. -
getFile
Description copied from interface:RequestRetrieves an uploaded file. -
getFiles
Description copied from interface:RequestRetrieves all files that have been uploaded for a particular name. -
hasCookie
Description copied from interface:RequestChecks whether a cookie is present. -
getCookie
Description copied from interface:RequestRetrieves a cookie. -
getAttribute
Description copied from interface:Request- Specified by:
getAttributein interfaceRequest
-
getCookies
Description copied from interface:Request- Specified by:
getCookiesin interfaceRequest
-
hasAttribute
Description copied from interface:RequestChecks if a request attribute exists.- Specified by:
hasAttributein interfaceRequest- Parameters:
name- aStringspecifying the name of the attributefalseotherwise
-
getAttributeNames
Description copied from interface:Request- Specified by:
getAttributeNamesin interfaceRequest
-
getCharacterEncoding
Description copied from interface:Request- Specified by:
getCharacterEncodingin interfaceRequest
-
getContentType
Description copied from interface:Request- Specified by:
getContentTypein interfaceRequest
-
getDateHeader
Description copied from interface:Request- Specified by:
getDateHeaderin interfaceRequest
-
getHeader
Description copied from interface:Request -
getHeaderNames
Description copied from interface:Request- Specified by:
getHeaderNamesin interfaceRequest
-
getHeaders
Description copied from interface:Request- Specified by:
getHeadersin interfaceRequest
-
getIntHeader
Description copied from interface:Request- Specified by:
getIntHeaderin interfaceRequest
-
getLocale
Description copied from interface:Request -
getLocales
Description copied from interface:Request- Specified by:
getLocalesin interfaceRequest
-
getProtocol
Description copied from interface:Request- Specified by:
getProtocolin interfaceRequest
-
getRemoteAddr
Description copied from interface:Request- Specified by:
getRemoteAddrin interfaceRequest
-
getRemoteUser
Description copied from interface:Request- Specified by:
getRemoteUserin interfaceRequest
-
getRemoteHost
Description copied from interface:Request- Specified by:
getRemoteHostin interfaceRequest
-
getRequestDispatcher
Description copied from interface:Request- Specified by:
getRequestDispatcherin interfaceRequest
-
getSession
Description copied from interface:Request- Specified by:
getSessionin interfaceRequest
-
getSession
Description copied from interface:Request- Specified by:
getSessionin interfaceRequest
-
getServerPort
public int getServerPort()Description copied from interface:Request- Specified by:
getServerPortin interfaceRequest
-
getScheme
Description copied from interface:Request -
getServerName
Description copied from interface:Request- Specified by:
getServerNamein interfaceRequest
-
getContextPath
Description copied from interface:Request- Specified by:
getContextPathin interfaceRequest
-
isSecure
public boolean isSecure()Description copied from interface:Request -
removeAttribute
Description copied from interface:Request- Specified by:
removeAttributein interfaceRequest
-
setAttribute
Description copied from interface:Request- Specified by:
setAttributein interfaceRequest
-
getServerRootUrl
Description copied from interface:RequestReturns the root URL of the server that is running this web applications.This includes the protocol, the server name and the server port, for example:
http://www.somehost.com:8080.- Specified by:
getServerRootUrlin interfaceRequest- Returns:
- the server's root url
-
getHttpServletRequest
Description copied from interface:RequestRetrieves the underlyingHttpServletRequest.- Specified by:
getHttpServletRequestin interfaceRequest- Returns:
- the underlying
HttpServletRequestinstance; ornullif this request isn't backed byHttpServletRequest
-