|
||||||||||
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 |
Constructor Summary | |
---|---|
DefaultWebContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletConfig config,
javax.servlet.ServletContext context,
Container container)
Create a new DefaultWebContext |
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. |
java.lang.String |
getVersion()
Fish the version number out of the dwr.properties file. |
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 class org.directwebremoting.impl.DefaultServerContext |
---|
getAllScriptSessions, getContainer, getScriptSessionsByPage, getServletConfig, getServletContext |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.directwebremoting.ServerContext |
---|
getAllScriptSessions, getContainer, getScriptSessionsByPage, getServletConfig, getServletContext |
Constructor Detail |
---|
public DefaultWebContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletConfig config, javax.servlet.ServletContext context, Container container)
request
- The incoming http requestresponse
- The outgoing http replyconfig
- The servlet configurationcontext
- The servlet contextcontainer
- The IoC containerWebContextFactory.WebContextBuilder.set(HttpServletRequest, HttpServletResponse, ServletConfig, ServletContext, Container)
Method Detail |
---|
public void setCurrentPageInformation(java.lang.String page, java.lang.String scriptSessionId)
WebContext
setCurrentPageInformation
in interface WebContext
page
- The URL of the current pagescriptSessionId
- The session id passed in by the browserpublic java.lang.String getCurrentPage()
WebContext
getCurrentPage
in interface WebContext
public ScriptSession getScriptSession()
WebContext
getScriptSession
in interface WebContext
public javax.servlet.http.HttpSession getSession()
WebContext
getSession
in interface WebContext
HttpServletRequest.getSession()
public javax.servlet.http.HttpSession getSession(boolean create)
WebContext
getSession
in interface WebContext
create
- false to return null if there's no current session
HttpServletRequest.getSession(boolean)
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
WebContext
getHttpServletRequest
in interface WebContext
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
WebContext
You 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
WebContext
request.setAttribute(WebContext.ATTRIBUTE_DWR, Boolean.TRUE);
forwardToString
in interface WebContext
url
- 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 getVersion()
ServerContext
getVersion
in interface ServerContext
getVersion
in class DefaultServerContext
|
Copyright ? 2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |