org.apache.struts2.spi
Interface RequestContext


public interface RequestContext

Request context. A single request may span multiple actions with action chaining.

Author:
crazybob@google.com (Bob Lee)

Method Summary
 java.util.List<javax.servlet.http.Cookie> findCookiesForName(java.lang.String name)
          Finds cookies with the given name,
 java.lang.Object getAction()
          Convenience method. Equivalent to getActionContext().getAction().
 ActionContext getActionContext()
          Gets context of the currently executing action.
 java.util.Map<java.lang.String,java.lang.Object> getApplicationMap()
          Gets map of application (servlet context) attributes.
 java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()
          Gets map of request attributes.
 java.util.Locale getLocale()
          Gets locale.
 Messages getMessages()
          Gets messages.
 java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
          Gets map of request parameters.
 javax.servlet.ServletContext getServletContext()
          Gets the servlet context.
 javax.servlet.http.HttpServletRequest getServletRequest()
          Gets the servlet request.
 javax.servlet.http.HttpServletResponse getServletResponse()
          Gets the servlet response.
 java.util.Map<java.lang.String,java.lang.Object> getSessionMap()
          Gets map of session attributes.
 ValueStack getValueStack()
          Gets the value stack.
 java.lang.String proceed()
          Invokes the next interceptor or the action method if no more interceptors remain.
 void setLocale(java.util.Locale locale)
          Sets locale.
 

Method Detail

getActionContext

ActionContext getActionContext()
Gets context of the currently executing action.

Returns:
current action context

getAction

java.lang.Object getAction()
Convenience method. Equivalent to getActionContext().getAction().

Returns:
currently executing action

getParameterMap

java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Gets map of request parameters.


getAttributeMap

java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()
Gets map of request attributes.


getSessionMap

java.util.Map<java.lang.String,java.lang.Object> getSessionMap()
Gets map of session attributes.


getApplicationMap

java.util.Map<java.lang.String,java.lang.Object> getApplicationMap()
Gets map of application (servlet context) attributes.


findCookiesForName

java.util.List<javax.servlet.http.Cookie> findCookiesForName(java.lang.String name)
Finds cookies with the given name,


getLocale

java.util.Locale getLocale()
Gets locale.


setLocale

void setLocale(java.util.Locale locale)
Sets locale. Stores the locale in the session for future requests.


getMessages

Messages getMessages()
Gets messages.


getServletRequest

javax.servlet.http.HttpServletRequest getServletRequest()
Gets the servlet request.


getServletResponse

javax.servlet.http.HttpServletResponse getServletResponse()
Gets the servlet response.


getServletContext

javax.servlet.ServletContext getServletContext()
Gets the servlet context.


getValueStack

ValueStack getValueStack()
Gets the value stack.


proceed

java.lang.String proceed()
                         throws java.lang.Exception
Invokes the next interceptor or the action method if no more interceptors remain.

Returns:
result name
Throws:
java.lang.IllegalStateException - if already invoked or called from the action
java.lang.Exception


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.