Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2
Class ServletActionContext

    java.lang.Object
      com.opensymphony.xwork2.ActionContext
          org.apache.struts2.ServletActionContext

All Implemented Interfaces:
  Serializable, StrutsStatics

    public class ServletActionContext

extends ActionContext
implements StrutsStatics

Web-specific context information for actions. This class subclasses `ActionContext` which provides access to things like the action name, value stack, etc. This class adds access to web objects like servlet parameters, request attributes and things like the HTTP session.

See Also:
  Serialized Form

Field Summary
`static String` | `ACTION_MAPPING`
`private static long` | `serialVersionUID`
`static String` | `STRUTS_VALUESTACK_KEY`

Fields inherited from class com.opensymphony.xwork2.ActionContext
`ACTION_INVOCATION, ACTION_NAME, APPLICATION, CONVERSION_ERRORS, LOCALE, PARAMETERS, SESSION, TYPE_CONVERTER, VALUE_STACK`

Fields inherited from interface org.apache.struts2.StrutsStatics
`HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT`

Constructor Summary
`private` | `ServletActionContext(Map context)`

Method Summary
`static ActionContext` | `getActionContext(HttpServletRequest req)` Gets the current action context
`static ActionMapping` | `getActionMapping()` Gets the action mapping for this context
`static PageContext` | `getPageContext()` Returns the HTTP page context.
`static HttpServletRequest` | `getRequest()` Gets the HTTP servlet request object.
`static HttpServletResponse` | `getResponse()` Gets the HTTP servlet response object.
`static ServletContext` | `getServletContext()` Gets the servlet context.
`static ValueStack` | `getValueStack(HttpServletRequest req)` Gets the current value stack for this request
`static void` | `setRequest(HttpServletRequest request)` Sets the HTTP servlet request object.
`static void` | `setResponse(HttpServletResponse response)` Sets the HTTP servlet response object.
`static void` | `setServletContext(ServletContext servletContext)` Sets the current servlet context object

Methods inherited from class com.opensymphony.xwork2.ActionContext
`get, getActionInvocation, getApplication, getContext, getContextMap, getConversionErrors, getLocale, getName, getParameters, getSession, getValueStack, put, setActionInvocation, setApplication, setContext, setContextMap, setConversionErrors, setLocale, setName, setParameters, setSession, setValueStack`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

See Also:
  Constant Field Values

### STRUTS_VALUESTACK_KEY

    public static final String STRUTS_VALUESTACK_KEY

See Also:
  Constant Field Values

### ACTION_MAPPING

    public static final String ACTION_MAPPING

See Also:
  Constant Field Values

Constructor Detail

### ServletActionContext

    private ServletActionContext(Map context)

Method Detail

### getActionContext

    public static ActionContext getActionContext(HttpServletRequest req)

  Gets the current action context

  Parameters:
    `req` - The request
  Returns:
    The current action context

### getValueStack

    public static ValueStack getValueStack(HttpServletRequest req)

  Gets the current value stack for this request

  Parameters:
    `req` - The request
  Returns:
    The value stack

### getActionMapping

    public static ActionMapping getActionMapping()

  Gets the action mapping for this context

  Returns:
    The action mapping

### getPageContext

    public static PageContext getPageContext()

  Returns the HTTP page context.

  Returns:
    the HTTP page context.

### setRequest

    public static void setRequest(HttpServletRequest request)

  Sets the HTTP servlet request object.

  Parameters:
    `request` - the HTTP servlet request object.

### getRequest

    public static HttpServletRequest getRequest()

  Gets the HTTP servlet request object.

  Returns:
    the HTTP servlet request object.

### setResponse

    public static void setResponse(HttpServletResponse response)

  Sets the HTTP servlet response object.

  Parameters:
    `response` - the HTTP servlet response object.

### getResponse

    public static HttpServletResponse getResponse()

  Gets the HTTP servlet response object.

  Returns:
    the HTTP servlet response object.

### getServletContext

    public static ServletContext getServletContext()

  Gets the servlet context.

  Returns:
    the servlet context.

### setServletContext

    public static void setServletContext(ServletContext servletContext)

  Sets the current servlet context object

  Parameters:
    `servletContext` - The servlet context to use

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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