1
public void Test(HttpServletRequest request,HttpServletResponse response){
}
2 ActionContext ctx = ActionContext.getContext();
HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
3 struts2 获取
ServletActionContext.getResponse().setCharacterEncoding("UTF-8");
org.apache.struts2.ServletActionContext 这个包下面的
ServletActionContext.getRequest();
ServletActionContext.getResponse();