|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WebContext
Class to enable us to access servlet parameters.
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTE_DWR
An attribute used by forwardToString(String) to inform
anyone that wants to know that this is a request from DWR. |
| Method Summary | |
|---|---|
java.lang.String |
forwardToString(java.lang.String url)
Forward a request to a given URL and catch the data written to it. |
java.lang.String |
getCurrentPage()
What is the URL of the current page. |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Accessor for the http request information. |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Accessor for the http response bean. |
ScriptSession |
getScriptSession()
Get the script session that represents the currently viewed page in the same way that an HttpSession represents a cookie. |
javax.servlet.http.HttpSession |
getSession()
Returns the current session associated with this request, or if the request does not have a session, creates one. |
javax.servlet.http.HttpSession |
getSession(boolean create)
Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session. |
void |
setCurrentPageInformation(java.lang.String page,
java.lang.String scriptSessionId)
For system use only: This method allows the system to fill in the session id and page id when they are discovered. |
| Methods inherited from interface org.directwebremoting.ServerContext |
|---|
getAllScriptSessions, getContainer, getScriptSessionsByPage, getServletConfig, getServletContext, getVersion |
| Field Detail |
|---|
static final java.lang.String ATTRIBUTE_DWR
forwardToString(String) to inform
anyone that wants to know that this is a request from DWR.
| Method Detail |
|---|
ScriptSession getScriptSession()
java.lang.String getCurrentPage()
javax.servlet.http.HttpSession getSession()
HttpServletRequest.getSession()javax.servlet.http.HttpSession getSession(boolean create)
create - false to return null if there's no current session
HttpServletRequest.getSession(boolean)javax.servlet.http.HttpServletRequest getHttpServletRequest()
javax.servlet.http.HttpServletResponse getHttpServletResponse()
You can't use this request to directly reply to the response or to add headers or cookies.
java.lang.String forwardToString(java.lang.String url)
throws javax.servlet.ServletException,
java.io.IOException
request.setAttribute(WebContext.ATTRIBUTE_DWR, Boolean.TRUE);
url - The URL to forward to
java.io.IOException - if the target resource throws this exception
javax.servlet.ServletException - if the target resource throws this exception
java.lang.IllegalStateException - if the response was already committed
void setCurrentPageInformation(java.lang.String page,
java.lang.String scriptSessionId)
page - The URL of the current pagescriptSessionId - The session id passed in by the browser
|
Copyright ¬ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||