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:
Finally, because of the thread local usage you don't need to worry about making your actions thread safe.
author: Patrick Lightbody author: Bill Lynch (docs)
get(Object key) Returns a value that is stored in the current ActionContext by doing a lookup using the value's key.
Parameters: key - the key used to find the value.
Constant that indicates the action is running under a "development mode".
This mode provides more feedback that is useful for developers but probably
too verbose/error prone for production.
Returns a value that is stored in the current ActionContext by doing a lookup using the value's key.
Parameters: key - the key used to find the value. the value that was found using the key or null if the key was not found.
Returns a Map of the ServletContext when in a servlet environment or a generic application level Map otherwise.
a Map of ServletContext or generic application level Map
Gets the map of conversion errors which occurred when executing the action.
the map of conversion errors which occurred when executing the action or an empty map ifthere were no errors.
Gets the Locale of the current action. If no locale was ever specified the platform's
java.util.Locale.getDefault default locale is used.
the Locale of the current action.
Returns a Map of the HttpServletRequest parameters when in a servlet environment or a generic Map of
parameters otherwise.
a Map of HttpServletRequest parameters or a multipart map when in a servlet environment, or ageneric Map of parameters otherwise.
Gets the Map of HttpSession values when in a servlet environment or a generic session map otherwise.
the Map of HttpSession values when in a servlet environment or a generic session map otherwise.
Stores a value in the current ActionContext. The value can be looked up using the key.
Parameters: key - the key of the value. Parameters: value - the value to be stored.
Sets the action's context map.
Parameters: contextMap - the context map.
setConversionErrors
public void setConversionErrors(Map conversionErrors)(Code)
Sets conversion errors which occurred when executing the action.
Parameters: conversionErrors - a Map of errors which occurred when executing the action.