DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
You can obtain the request parameters by asking the ActionContext or implementing ParameterAware. Implementing ParameterAware is preferred.
Ask the ActionContext
The request parameters are available on the ActionContext instance, which is made available via ThreadLocal.
Map parameters = ActionContext.getContext().getParameters();
Implement HttpParametersAware
Preferred
- Ensure that
servlet-configInterceptor is included in the Action's stack.The default stack already includes
servlet-config.
- Edit the Action so that it implements the HttpParametersAware interface.
- The HttpParametersAware interface expects a
setParametersmethod. You may wish to include a companiongetParametersmethod.
- The HttpParametersAware interface expects a
- At runtime, call
getParametersto obtain an object representing the request parameters.
When the servlet-config Interceptor sees that an Action implements ParameterAware, it passes a Map of the request parameters to the Action's setParameters method.
see struts-default.xml and org.apache.struts.action2.interceptor.Servlet Config Interceptor