「struts2入門」ServletRequestAware ActionContextの使い方

Javaコード:
@SuppressWarnings(“serial")
public class DemoRequestAction extends ActionSupport implements ServletRequestAware{
private HttpServletRequest request ;
@Override
public void setServletRequest(HttpServletRequest request) {
this.request = request;
}

public String showRet(){
String retStr = request.getParameter(“retStr");
System.out.println(“msg:"+retStr);
return this.SUCCESS;
}

}

Java

Posted by arkgame