|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ltd.getahead.dwr.ExecutionContext
@Deprecated public class ExecutionContext
Class to enable us to access servlet parameters.
| Field Summary |
|---|
| Fields inherited from interface org.directwebremoting.WebContext |
|---|
ATTRIBUTE_DWR |
| Method Summary | |
|---|---|
java.lang.String |
forwardToString(java.lang.String url)
Deprecated. Forward a request to a given URL and catch the data written to it. |
static ExecutionContext |
get()
Deprecated. Use WebContextFactory.get() for better results |
java.util.Collection<ScriptSession> |
getAllScriptSessions()
Deprecated. Get a list of all the ScriptSessions known to this server at the given time. |
Container |
getContainer()
Deprecated. Accessor for the IoC container. |
java.lang.String |
getContextPath()
Deprecated. Returns the portion of the request URI that indicates the context of the request. |
java.lang.String |
getCurrentPage()
Deprecated. What is the URL of the current page. |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Deprecated. Accessor for the http request information. |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Deprecated. Accessor for the http response bean. |
ScriptSession |
getScriptSession()
Deprecated. Get the script session that represents the currently viewed page in the same way that an HttpSession represents a cookie. |
ScriptSession |
getScriptSessionById(java.lang.String sessionId)
Deprecated. You can request access to a specific ScriptSession if you know
it's ID. |
java.util.Collection<ScriptSession> |
getScriptSessionsByPage(java.lang.String page)
Deprecated. Get a list of all ScriptSessions on a given page. |
javax.servlet.ServletConfig |
getServletConfig()
Deprecated. Accessor for the servlet config. |
javax.servlet.ServletContext |
getServletContext()
Deprecated. Returns the ServletContext to which this session belongs. |
javax.servlet.http.HttpSession |
getSession()
Deprecated. 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)
Deprecated. 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()
Deprecated. Fish the version number out of the dwr.properties file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public 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.ServletConfig getServletConfig()
ServerContext
getServletConfig in interface ServerContextpublic javax.servlet.ServletContext getServletContext()
ServerContext
getServletContext in interface ServerContextpublic 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 getVersion()
ServerContext
getVersion in interface ServerContextpublic ScriptSession getScriptSession()
WebContext
getScriptSession in interface WebContextpublic java.util.Collection<ScriptSession> getAllScriptSessions()
ServerContext
getAllScriptSessions in interface ServerContextpublic java.util.Collection<ScriptSession> getScriptSessionsByPage(java.lang.String page)
ServerContext
getScriptSessionsByPage in interface ServerContextpage - The URL including 'http://', up to (but not including) '?' or '#'
public ScriptSession getScriptSessionById(java.lang.String sessionId)
ServerContextScriptSession if you know
it's ID.
Take care with this method because it allows actions from one browser to affect another which could be a bad thing. It is certainly a VERY BAD idea to let session id's from one browser escape into another.
Consider that it is entirely possible that the ScriptSession may timeout while you are holding a reference to it.
getScriptSessionById in interface ServerContextsessionId - The script session ID to lookup
public Container getContainer()
ServerContext
getContainer in interface ServerContextpublic java.lang.String getCurrentPage()
WebContext
getCurrentPage in interface WebContextpublic java.lang.String getContextPath()
ServerContextAnnoyingly you can't get to this from the ServletContext so
you need to cache the value from a recent HttpServletRequest.
The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.
WARNING: This method may return null if DWR has not received any requests. If this method is called from outside of DWR, as the servlet environment is starting up you should check for a null reply and try again later.
getContextPath in interface ServerContext@Deprecated public static ExecutionContext get()
|
Copyright ¬ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||