org.apache.struts2
类 ServletActionContext

java.lang.Object
  继承者 com.opensymphony.xwork2.ActionContext
      继承者 org.apache.struts2.ServletActionContext
所有已实现的接口:
Serializable, StrutsStatics

public class ServletActionContext
extends com.opensymphony.xwork2.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.

另请参见:
序列化表格

字段摘要
static String ACTION_MAPPING
           
static String STRUTS_VALUESTACK_KEY
           
 
从类 com.opensymphony.xwork2.ActionContext 继承的字段
ACTION_INVOCATION, ACTION_NAME, APPLICATION, CONTAINER, CONVERSION_ERRORS, LOCALE, PARAMETERS, SESSION, TYPE_CONVERTER, VALUE_STACK
 
从接口 org.apache.struts2.StrutsStatics 继承的字段
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT
 
方法摘要
static com.opensymphony.xwork2.ActionContext getActionContext(javax.servlet.http.HttpServletRequest req)
          Gets the current action context
static ActionMapping getActionMapping()
          Gets the action mapping for this context
static javax.servlet.jsp.PageContext getPageContext()
          Returns the HTTP page context.
static javax.servlet.http.HttpServletRequest getRequest()
          Gets the HTTP servlet request object.
static javax.servlet.http.HttpServletResponse getResponse()
          Gets the HTTP servlet response object.
static javax.servlet.ServletContext getServletContext()
          Gets the servlet context.
static com.opensymphony.xwork2.util.ValueStack getValueStack(javax.servlet.http.HttpServletRequest req)
          Gets the current value stack for this request
static void setRequest(javax.servlet.http.HttpServletRequest request)
          Sets the HTTP servlet request object.
static void setResponse(javax.servlet.http.HttpServletResponse response)
          Sets the HTTP servlet response object.
static void setServletContext(javax.servlet.ServletContext servletContext)
          Sets the current servlet context object
 
从类 com.opensymphony.xwork2.ActionContext 继承的方法
get, getActionInvocation, getApplication, getContainer, getContext, getContextMap, getConversionErrors, getInstance, getLocale, getName, getParameters, getSession, getValueStack, put, setActionInvocation, setApplication, setContainer, setContext, setContextMap, setConversionErrors, setLocale, setName, setParameters, setSession, setValueStack
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

STRUTS_VALUESTACK_KEY

public static final String STRUTS_VALUESTACK_KEY
另请参见:
常量字段值

ACTION_MAPPING

public static final String ACTION_MAPPING
另请参见:
常量字段值
方法详细信息

getActionContext

public static com.opensymphony.xwork2.ActionContext getActionContext(javax.servlet.http.HttpServletRequest req)
Gets the current action context

参数:
req - The request
返回:
The current action context

getValueStack

public static com.opensymphony.xwork2.util.ValueStack getValueStack(javax.servlet.http.HttpServletRequest req)
Gets the current value stack for this request

参数:
req - The request
返回:
The value stack

getActionMapping

public static ActionMapping getActionMapping()
Gets the action mapping for this context

返回:
The action mapping

getPageContext

public static javax.servlet.jsp.PageContext getPageContext()
Returns the HTTP page context.

返回:
the HTTP page context.

setRequest

public static void setRequest(javax.servlet.http.HttpServletRequest request)
Sets the HTTP servlet request object.

参数:
request - the HTTP servlet request object.

getRequest

public static javax.servlet.http.HttpServletRequest getRequest()
Gets the HTTP servlet request object.

返回:
the HTTP servlet request object.

setResponse

public static void setResponse(javax.servlet.http.HttpServletResponse response)
Sets the HTTP servlet response object.

参数:
response - the HTTP servlet response object.

getResponse

public static javax.servlet.http.HttpServletResponse getResponse()
Gets the HTTP servlet response object.

返回:
the HTTP servlet response object.

getServletContext

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

返回:
the servlet context.

setServletContext

public static void setServletContext(javax.servlet.ServletContext servletContext)
Sets the current servlet context object

参数:
servletContext - The servlet context to use