I need to set a ServletRequest attribute within a Struts2 interceptor (not action class).
Does the ActionContext expose a Map<String, Object> to control request attributes, like it does for session attributes?
I see ActionContext implements a map. Is the ActionContext itself a wrapper for the request attributes?
For code that is not inside an action class (
RequestAwareshould be used for action classes), Struts2 can expose the servlet request attributes as a Map. They are accessible with:See Strus2 documentation for more details.