Package helma.framework
Class RequestBean
java.lang.Object
helma.framework.RequestBean
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe action handler allows the onRequest() method to set the function object to be invoked for processing the request, overriding the action resolved from the request path.getData()
long
getDateHeader
(String name) Proxy to HttpServletRequest.getDateHeader(), fails silently by returning -1.Proxy to HttpServletRequest.getHeader().String[]
getHeaders
(String name) Proxy to HttpServletRequest.getHeaders(), returns header values as string array.int
getIntHeader
(String name) Proxy to HttpServletRequest.getIntHeader(), fails silently by returning -1.Return the method of the request.getPath()
long
javax.servlet.http.HttpServletRequest
Returns the Servlet request represented by this RequestTrans instance.getUri()
boolean
isGet()
boolean
isPost()
void
setActionHandler
(Object handler) The action handler allows the onRequest() method to set the function object to be invoked for processing the request, overriding the action resolved from the request path.toString()
-
Constructor Details
-
RequestBean
Creates a new RequestBean object.- Parameters:
req
- ...
-
-
Method Details
-
get
- Parameters:
name
- ...- Returns:
- ...
-
getMethod
Return the method of the request. This may either be a HTTP method or one of the Helma pseudo methods defined in RequestTrans. -
isGet
public boolean isGet()- Returns:
- ...
-
isPost
public boolean isPost()- Returns:
- ...
-
getServletRequest
public javax.servlet.http.HttpServletRequest getServletRequest()Returns the Servlet request represented by this RequestTrans instance. Returns null for internal and XML-RPC requests. -
getHeader
Proxy to HttpServletRequest.getHeader().- Parameters:
name
- the header name- Returns:
- the header value, or null
-
getHeaders
Proxy to HttpServletRequest.getHeaders(), returns header values as string array.- Parameters:
name
- the header name- Returns:
- the header values as string array
-
getIntHeader
Proxy to HttpServletRequest.getIntHeader(), fails silently by returning -1.- Parameters:
name
- the header name- Returns:
- the header parsed as integer or -1
-
getDateHeader
Proxy to HttpServletRequest.getDateHeader(), fails silently by returning -1.- Parameters:
name
- the header name- Returns:
- the date in milliseconds, or -1
-
toString
-
getAction
- Returns:
- the invoked action
-
getData
- Returns:
- The req.data map containing request parameters, cookies and assorted HTTP headers
-
getParams
- Returns:
- the req.params map containing combined query and post parameters
-
getQueryParams
- Returns:
- the req.queryParams map containing parameters parsed from the query string
-
getPostParams
- Returns:
- the req.postParams map containing params parsed from post data
-
getCookies
- Returns:
- the req.cookies map containing request cookies
-
getRuntime
public long getRuntime()- Returns:
- the time this request has been running, in milliseconds
-
getPassword
- Returns:
- the password if using HTTP basic authentication
-
getPath
- Returns:
- the request path
-
getUri
- Returns:
- the request URI
-
getUsername
- Returns:
- the username if using HTTP basic authentication
-
getActionHandler
The action handler allows the onRequest() method to set the function object to be invoked for processing the request, overriding the action resolved from the request path.- Returns:
- the action handler
-
setActionHandler
The action handler allows the onRequest() method to set the function object to be invoked for processing the request, overriding the action resolved from the request path.- Parameters:
handler
- the action handler
-