ActionContext instead.@Deprecated public class ActionContext extends ActionContext
The ActionContext is the context in which an Action is executed. Each context is basically a
container of objects an action needs for execution like the session, parameters, locale, etc.
The ActionContext is thread local which means that values stored in the ActionContext are
unique per thread. See the ThreadLocal class for more information. The benefit of
this is you don't need to worry about a user specific action context, you just get it:
ActionContext context = ActionContext.getContext();
Finally, because of the thread local usage you don't need to worry about making your actions thread safe.
| Modifier and Type | Method and Description |
|---|---|
static ActionContext |
adapt(ActionContext actualContext)
Deprecated.
|
ActionContext |
bind()
Deprecated.
Binds this context with the current thread
|
static ActionContext |
bind(ActionContext actionContext)
Deprecated.
|
static void |
clear()
Deprecated.
|
static boolean |
containsValueStack(Map<String,Object> context)
Deprecated.
|
Object |
get(String key)
Deprecated.
Returns a value that is stored in the current ActionContext by doing a lookup using the value's key.
|
ActionInvocation |
getActionInvocation()
Deprecated.
Gets the action invocation (the execution state).
|
ActionMapping |
getActionMapping()
Deprecated.
Gets ActionMapping associated with current action
|
String |
getActionName()
Deprecated.
Gets the name of the current Action.
|
Map<String,Object> |
getApplication()
Deprecated.
Returns a Map of the ServletContext when in a servlet environment or a generic application level Map otherwise.
|
Container |
getContainer()
Deprecated.
Sets the container for this request
|
static ActionContext |
getContext()
Deprecated.
|
Map<String,Object> |
getContextMap()
Deprecated.
Gets the context map.
|
Map<String,ConversionData> |
getConversionErrors()
Deprecated.
Gets the map of conversion errors which occurred when executing the action.
|
<T> T |
getInstance(Class<T> type)
Deprecated.
|
Locale |
getLocale()
Deprecated.
Gets the Locale of the current action.
|
javax.servlet.jsp.PageContext |
getPageContext()
Deprecated.
Gets PageContext associated with current action
|
HttpParameters |
getParameters()
Deprecated.
Returns a Map of the HttpServletRequest parameters when in a servlet environment or a generic Map of
parameters otherwise.
|
javax.servlet.ServletContext |
getServletContext()
Deprecated.
Gets ServletContext associated with current action
|
javax.servlet.http.HttpServletRequest |
getServletRequest()
Deprecated.
Gets ServletRequest associated with current action
|
javax.servlet.http.HttpServletResponse |
getServletResponse()
Deprecated.
Gets ServletResponse associated with current action
|
Map<String,Object> |
getSession()
Deprecated.
Gets the Map of HttpSession values when in a servlet environment or a generic session map otherwise.
|
ValueStack |
getValueStack()
Deprecated.
Gets the OGNL value stack.
|
static ActionContext |
of()
Deprecated.
|
static ActionContext |
of(Map<String,Object> context)
Deprecated.
|
void |
put(String key,
Object value)
Deprecated.
Stores a value in the current ActionContext.
|
ActionContext |
with(String key,
Object value)
Deprecated.
Adds arbitrary key to action context
|
ActionContext |
withActionInvocation(ActionInvocation actionInvocation)
Deprecated.
|
ActionContext |
withActionInvocation(ActionInvocation actionInvocation)
Deprecated.
Sets the action invocation (the execution state).
|
ActionContext |
withActionMapping(ActionMapping actionMapping)
Deprecated.
Assigns ActionMapping to action context
|
ActionContext |
withActionName(String actionName)
Deprecated.
Sets the name of the current Action in the ActionContext.
|
ActionContext |
withApplication(Map<String,Object> application)
Deprecated.
Sets the action's application context.
|
ActionContext |
withContainer(Container container)
Deprecated.
Gets the container for this request
|
ActionContext |
withConversionErrors(Map<String,ConversionData> conversionErrors)
Deprecated.
Sets conversion errors which occurred when executing the action.
|
ActionContext |
withExtraContext(Map<String,Object> extraContext)
Deprecated.
Assigns an extra context map to action context
|
ActionContext |
withLocale(Locale locale)
Deprecated.
Sets the Locale for the current action.
|
ActionContext |
withPageContext(javax.servlet.jsp.PageContext pageContext)
Deprecated.
Assigns PageContext to action context
|
ActionContext |
withParameters(HttpParameters parameters)
Deprecated.
Sets the action parameters.
|
ActionContext |
withServletContext(javax.servlet.ServletContext servletContext)
Deprecated.
Assigns ServletContext to action context
|
ActionContext |
withServletRequest(javax.servlet.http.HttpServletRequest request)
Deprecated.
Assigns ServletRequest to action context
|
ActionContext |
withServletResponse(javax.servlet.http.HttpServletResponse response)
Deprecated.
Assigns ServletResponse to action context
|
ActionContext |
withSession(Map<String,Object> session)
Deprecated.
Sets a map of action session values.
|
ActionContext |
withValueStack(ValueStack valueStack)
Deprecated.
|
ActionContext |
withValueStack(ValueStack valueStack)
Deprecated.
Sets the OGNL value stack.
|
equals, hashCodepublic static ActionContext adapt(ActionContext actualContext)
public static ActionContext of(Map<String,Object> context)
public static ActionContext of()
public static ActionContext bind(ActionContext actionContext)
public static void clear()
public static ActionContext getContext()
public ActionContext bind()
ActionContextbind in class ActionContextpublic ActionContext withActionInvocation(ActionInvocation actionInvocation)
public ActionContext withActionInvocation(ActionInvocation actionInvocation)
ActionContextwithActionInvocation in class ActionContextactionInvocation - the action execution state.public ActionInvocation getActionInvocation()
ActionContextgetActionInvocation in class ActionContextpublic ActionContext withApplication(Map<String,Object> application)
ActionContextwithApplication in class ActionContextapplication - the action's application context.public Map<String,Object> getApplication()
ActionContextgetApplication in class ActionContextpublic Map<String,Object> getContextMap()
ActionContextgetContextMap in class ActionContextpublic ActionContext withConversionErrors(Map<String,ConversionData> conversionErrors)
ActionContextwithConversionErrors in class ActionContextconversionErrors - a Map of errors which occurred when executing the action.public Map<String,ConversionData> getConversionErrors()
ActionContextgetConversionErrors in class ActionContextpublic ActionContext withLocale(Locale locale)
ActionContextwithLocale in class ActionContextlocale - the Locale for the current action.public Locale getLocale()
ActionContextdefault locale is used.getLocale in class ActionContextpublic ActionContext withActionName(String actionName)
ActionContextwithActionName in class ActionContextactionName - the name of the current action.public String getActionName()
ActionContextgetActionName in class ActionContextpublic ActionContext withParameters(HttpParameters parameters)
ActionContextwithParameters in class ActionContextparameters - the parameters for the current action.public HttpParameters getParameters()
ActionContextgetParameters in class ActionContextpublic ActionContext withSession(Map<String,Object> session)
ActionContextwithSession in class ActionContextsession - the session values.public Map<String,Object> getSession()
ActionContextgetSession in class ActionContextpublic ActionContext withValueStack(ValueStack valueStack)
public ActionContext withValueStack(ValueStack valueStack)
ActionContextwithValueStack in class ActionContextvalueStack - the OGNL value stack.public ValueStack getValueStack()
ActionContextgetValueStack in class ActionContextpublic ActionContext withContainer(Container container)
ActionContextwithContainer in class ActionContextcontainer - The containerpublic Container getContainer()
ActionContextgetContainer in class ActionContextpublic <T> T getInstance(Class<T> type)
getInstance in class ActionContextpublic Object get(String key)
ActionContextget in class ActionContextkey - the key used to find the value.public void put(String key, Object value)
ActionContextput in class ActionContextkey - the key of the value.value - the value to be stored.public javax.servlet.ServletContext getServletContext()
ActionContextgetServletContext in class ActionContextpublic ActionContext withServletContext(javax.servlet.ServletContext servletContext)
ActionContextwithServletContext in class ActionContextservletContext - associated with current requestpublic javax.servlet.http.HttpServletRequest getServletRequest()
ActionContextgetServletRequest in class ActionContextpublic ActionContext withServletRequest(javax.servlet.http.HttpServletRequest request)
ActionContextwithServletRequest in class ActionContextrequest - associated with current requestpublic javax.servlet.http.HttpServletResponse getServletResponse()
ActionContextgetServletResponse in class ActionContextpublic ActionContext withServletResponse(javax.servlet.http.HttpServletResponse response)
ActionContextwithServletResponse in class ActionContextresponse - associated with current requestpublic javax.servlet.jsp.PageContext getPageContext()
ActionContextgetPageContext in class ActionContextpublic ActionContext withPageContext(javax.servlet.jsp.PageContext pageContext)
ActionContextwithPageContext in class ActionContextpageContext - associated with current requestpublic ActionMapping getActionMapping()
ActionContextgetActionMapping in class ActionContextpublic ActionContext withActionMapping(ActionMapping actionMapping)
ActionContextwithActionMapping in class ActionContextactionMapping - associated with current requestpublic ActionContext withExtraContext(Map<String,Object> extraContext)
ActionContextwithExtraContext in class ActionContextextraContext - to add to the current action contextpublic ActionContext with(String key, Object value)
ActionContextwith in class ActionContextkey - a stringvalue - an objectCopyright © 2000–2024 Apache Software Foundation. All rights reserved.