| Home > FAQs > How can we access request parameters passed into an Action |
You can obtain the request parameters by asking the ActionContext or implementing ParameterAware. Implementing ParameterAware is preferred.
The request parameters are available on the ActionContext instance, which is made available via ThreadLocal.
Preferred
servlet-config Interceptor is included in the Action's stack.
servlet-config.setParameters method. You may wish to include a companion getParameters method.getParameters to obtain a Map representing the request parameters.@see struts-default.xml
@see org.apache.struts.action2.interceptor.ParameterAware
@see org.apache.struts.action2.interceptor.Servlet Config Interceptor