WebObjects 5.4.2

com.webobjects.jspservlet
Class WOServletContext

java.lang.Object
  extended by com.webobjects.appserver.WOContext
      extended by com.webobjects.jspservlet.WOServletContext
All Implemented Interfaces:
NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, Cloneable

public class WOServletContext
extends WOContext
implements Cloneable


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Field Summary
 
Fields inherited from class com.webobjects.appserver.WOContext
EscapeQueryDictionary, SessionIDBindingKey, WOURLEncoding
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
WOServletContext(WORequest aRequest)
          Creates a new WOServletContext object with aRequest.
 
Method Summary
 javax.servlet.http.HttpServletRequest httpServletRequest()
          Returns the HttpServletRequest.
 javax.servlet.http.HttpServletResponse httpServletResponse()
          Returns the HttpServletResponse.
 javax.servlet.http.HttpSession httpSession()
          Returns the HttpSession, if it exists.
 Object jspPage()
          Returns the JSP page object that was part of the PageContext.
 javax.servlet.jsp.JspWriter jspWriter()
          Returns the JspWriter that was part of the PageContext.
 javax.servlet.ServletConfig servletConfig()
          Returns the ServletConfig.
 javax.servlet.ServletContext servletContext()
          Returns the ServletContext.
 WOSession session()
          Returns the object representing the receiving context's session, if one exists.
 
Methods inherited from class com.webobjects.appserver.WOContext
appendElementIDComponent, appendZeroElementIDComponent, canAccessFieldsDirectly, clone, completeApplicationURLPrefix, completeURLWithRequestHandlerKey, completeURLWithRequestHandlerKey, component, componentActionURL, componentActionURL, componentActionURL, computeQueryDictionary, contextID, contextWithRequest, deleteAllElementIDComponents, deleteLastElementIDComponent, directActionURLForActionNamed, directActionURLForActionNamed, directActionURLForActionNamed, directConnect, doesGenerateCompleteURLs, elementID, generateCompleteURLs, generateRelativeURLs, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasSession, incrementLastElementIDComponent, isInForm, isMultipleSubmitForm, javaScriptElementID, javaScriptElementIDPrefix, javaScriptElementIDSeparator, page, pageFragementID, relativeURLWithRequestHandlerKey, request, response, secureMode, secureRequest, senderID, sessionIDInQueryDictionary, setActionInvoked, setFormSubmitted, setInForm, setIsMultipleSubmitForm, setJavaScriptElementIDPrefix, setJavaScriptElementIDSeparator, setPageFragmentID, setSecureMode, setUserInfo, setUserInfoForKey, shouldNotStorePageInBacktrackCache, takeValueForKey, takeValueForKeyPath, toString, unableToSetNullForKey, urlWithRequestHandlerKey, userInfo, userInfoForKey, valueForKey, valueForKeyPath, wasActionInvoked, wasFormSubmitted
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WOServletContext

public WOServletContext(WORequest aRequest)
Creates a new WOServletContext object with aRequest. The userInfo dictionary of aRequest should contain at least the following: HttpServletRequest, HttpServletResponse ServletConfig, ServletContext. Optionally (for JSP pages), PageContext should also be included. The keys for the above objects are the same as the class of object. If PageContext is included, the JSP page and JspWriter objects will be extracted from the PageContext.

Parameters:
aRequest - the WORequest the context should be created for
Method Detail

session

public WOSession session()
Returns the object representing the receiving context's session, if one exists. The overriden method checks to see if the session is part of the JSP session. If that fails, it defaults to the superclass behavior.

Overrides:
session in class WOContext
Returns:
the object representing the receiving context's session
See Also:
WOContext.component(), WOContext.page(), WOContext.request(), WOContext.response(), WOContext.hasSession(), WOSession, WOApplication.createSessionForRequest(com.webobjects.appserver.WORequest)

jspWriter

public javax.servlet.jsp.JspWriter jspWriter()
Returns the JspWriter that was part of the PageContext. Only relevant for requests coming from JSP pages.

Returns:
JspWriter the JspWriter extracted from the PageContext

jspPage

public Object jspPage()
Returns the JSP page object that was part of the PageContext. Only relevant for requests coming from JSP pages.

Returns:
Object the page object extracted from the PageContext

httpServletRequest

public javax.servlet.http.HttpServletRequest httpServletRequest()
Returns the HttpServletRequest.

Returns:
HttpServletRequest the HttpServletRequest

httpServletResponse

public javax.servlet.http.HttpServletResponse httpServletResponse()
Returns the HttpServletResponse.

Returns:
HttpServletResponse the HttpServletResponse

servletConfig

public javax.servlet.ServletConfig servletConfig()
Returns the ServletConfig.

Returns:
ServletConfig the ServletConfig

servletContext

public javax.servlet.ServletContext servletContext()
Returns the ServletContext.

Returns:
ServletContext the ServletContext

httpSession

public javax.servlet.http.HttpSession httpSession()
Returns the HttpSession, if it exists. Returns null otherwise.

Returns:
HttpSession the JSP/Servlet session

Last updated June 2008

Copyright © 2000-2008 Apple Inc.