更新时间:2022-06-26 21:49:51
此代码应该为您提供servlet请求中的参数。假设您有一个参数值。
This code should give you parameters from the servlet request. Assume you have one value for the parameter.
public String intercept(ActionInvocation actionInvocation) throws Exception
{
Map<String, String[]> parameters = ServletActionContext.getRequest().getParameterMap();
String userId = parameters.get("bean.userId")[0];
System.out.println("Got it:"+userId);
return actionInvocation.invoke();
}