| org.directwebremoting.WebContext
WebContext | public interface WebContext extends ServerContext(Code) | | Class to enable us to access servlet parameters.
author: Joe Walker [joe at getahead dot ltd dot uk] |
forwardToString | String forwardToString(String url) throws ServletException, IOException(Code) | | Forward a request to a given URL and catch the data written to it.
It is possible to distinguish requests that arrive normally and requests
that come from a DWR forwardToString() by the presence of a request
attribute. Before the request is forwarded, DWR will call:
request.setAttribute(WebContext.ATTRIBUTE_DWR, Boolean.TRUE);
Parameters: url - The URL to forward to The text that results from forwarding to the given URL throws: IOException - if the target resource throws this exception throws: ServletException - if the target resource throws this exception throws: IllegalStateException - if the response was already committed |
getCurrentPage | String getCurrentPage()(Code) | | What is the URL of the current page.
This includes 'http://', up to (but not including) '?' or '#'
The URL of the current page |
getHttpServletRequest | HttpServletRequest getHttpServletRequest()(Code) | | Accessor for the http request information.
Returns the request. |
getHttpServletResponse | HttpServletResponse getHttpServletResponse()(Code) | | Accessor for the http response bean.
You can't use this request to directly reply to the response or to add
headers or cookies.
Returns the response. |
getScriptSession | ScriptSession getScriptSession()(Code) | | Get the script session that represents the currently viewed page in the
same way that an HttpSession represents a cookie.
A browser object for this user |
getSession | HttpSession getSession(boolean create)(Code) | | Returns the current HttpSession associated with this request or, if
there is no current session and create is true, returns a new session.
If create is false and the request has no valid HttpSession, this method
returns null.
Parameters: create - false to return null if there's no current session the session associated with this request See Also: HttpServletRequest.getSession(boolean) |
|
|