org.directwebremoting.extend
Interface RealWebContext

All Superinterfaces:
ServerContext, WebContext
All Known Implementing Classes:
DefaultWebContext

public interface RealWebContext
extends WebContext

An interface that extends WebContext with some functions that should not be used by end users, but could be useful to system extenders.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Field Summary
 
Fields inherited from interface org.directwebremoting.WebContext
ATTRIBUTE_DWR
 
Method Summary
 void checkPageInformation(java.lang.String sentPage, java.lang.String sentScriptId, java.lang.String windowName)
          Fill in the page details from the servlet request.
 
Methods inherited from interface org.directwebremoting.WebContext
forwardToString, getCurrentPage, getHttpServletRequest, getHttpServletResponse, getScriptSession, getSession, getSession
 
Methods inherited from interface org.directwebremoting.ServerContext
getAllScriptSessions, getContainer, getContextPath, getScriptSessionById, getScriptSessionsByPage, getServletConfig, getServletContext, getVersion
 

Method Detail

checkPageInformation

void checkPageInformation(java.lang.String sentPage,
                          java.lang.String sentScriptId,
                          java.lang.String windowName)
Fill in the page details from the servlet request.

This 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.

Caution Following this call, the passed scriptSessionId may be wrong. scriptSessionIds can become invalid due to server re-start, a timeout, or a back-button.

It seems wrong to throw a security exception, because it could be totally innocent. So this method will create a new script session and insert a script into the script session so that the page becomes synced with the new ID at the earliest possible opportunity.

Parameters:
sentPage - The URL of the current page
sentScriptId - The session id passed in by the browser
windowName - Reverse Ajax uses window.name to avoid 2 connection limit

Copyright 2008