|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.impl.DefaultServerContext
org.directwebremoting.impl.DefaultWebContext
public class DefaultWebContext
A default implementation of WebContext.
| Field Summary |
|---|
| Fields inherited from interface org.directwebremoting.WebContext |
|---|
ATTRIBUTE_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()
Returns the partial-URL of the page from which the current thread originated. |
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 |
initialize(java.lang.String sentPage,
RealScriptSession scriptSession)
Fill in the page details from the servlet request. |
java.lang.String |
toString()
|
| Methods inherited from class org.directwebremoting.impl.DefaultServerContext |
|---|
equals, getAllScriptSessions, getContainer, getContextPath, getScriptSessionById, getScriptSessionsByPage, getServletConfig, getServletContext, getVersion, setContainer, setServletConfig, setServletContext |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.directwebremoting.ServerContext |
|---|
getAllScriptSessions, getContainer, getContextPath, getScriptSessionById, getScriptSessionsByPage, getServletConfig, getServletContext, getVersion |
| Method Detail |
|---|
public void initialize(java.lang.String sentPage,
RealScriptSession scriptSession)
RealWebContextThis method should be used by anything that parses a batch, and then
allows either uses a WebContext or allows other things to use a
WebContext.
initialize in interface RealWebContextsentPage - The URL of the current pagescriptSession - The active ScriptSessionpublic java.lang.String getCurrentPage()
WebContext
getCurrentPage in interface WebContextfor details on how pages
are converted from external form to this form.public ScriptSession getScriptSession()
WebContextIf the DWR thread that gave rise to this WebContext is as a
result of a JSON call, this method will throw an UnsupportedOperationException
getScriptSession in interface WebContextpublic javax.servlet.http.HttpSession getSession()
WebContext
getSession in interface WebContextHttpServletRequest.getSession()public javax.servlet.http.HttpSession getSession(boolean create)
WebContext
getSession in interface WebContextcreate - false to return null if there's no current session
HttpServletRequest.getSession(boolean)public javax.servlet.http.HttpServletRequest getHttpServletRequest()
WebContext
getHttpServletRequest in interface WebContextpublic javax.servlet.http.HttpServletResponse getHttpServletResponse()
WebContextYou can't use this request to directly reply to the response or to add headers or cookies.
getHttpServletResponse in interface WebContext
public java.lang.String forwardToString(java.lang.String url)
throws javax.servlet.ServletException,
java.io.IOException
WebContextrequest.setAttribute(WebContext.ATTRIBUTE_DWR, Boolean.TRUE);
forwardToString in interface WebContexturl - The URL to forward to
javax.servlet.ServletException - if the target resource throws this exception
java.io.IOException - if the target resource throws this exceptionpublic java.lang.String toString()
toString in class DefaultServerContext
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||