81,122
社区成员




private String name ;
private Map request ;
private Map session ;
public DMLAction() {
request = (Map)ActionContext.getContext().get("request") ;
}
public String execute() {
System.out.println("name=" + name) ;
request.put("s1","gjhohj") ;
return SUCCESS ;
}
<package name="default" namespace="/t" extends="struts-default">
<action name="user" class="com.xlh.gjhohj.DMLAction">
<result>
/hello.jsp
</result>
</action>
</package>
ActionContext.getContext().put("list",list);
public DMLAction() {
request = (Map)ActionContext.getContext().get("request") ;
}
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<!-- <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> -->