Does anybody know if it is possible to change/remove request parameter values in a Struts2 interceptor?
The request parameter Map
is an instance of Un
May be you can try as this.
public String intercept(ActionInvocation invocation) throws Exception {
final ActionContext context = invocation.getInvocationContext();
Map parameters = (Map)context.get(ActionContext.PARAMETERS);
Map parametersCopy = new HashMap();
parametersCopy.putAll(parameters);
parametersCopy.put("myParam", "changedValue");
context.put(ActionContext.PARAMETERS, parametersCopy);
return invocation.invoke();
}