Struts2判断GET/POST请求
String method = ServletActionContext.getRequest().getMethod();
String method = ServletActionContext.getRequest().getMethod();
System.out.println(method);
if(method.equals("POST"){
System.out.println("POST请求");
}else{
System.out.println("GET请求");
}