Class: Accounting for 143
1. Previously used is the value of Requestgetparameter received, now with the action to accept, he will help you change the type of acceptance, relatively easy to operate.
2. The method is to inherit the Actionsupport () method first.
3. Add a method to the entity
Public String Add () {
System.out.println ("name" +name);
System.out.println ("Age" +age);
return SUCCESS;
}
Write specific actions and jump addresses in struts.
Struts>
<constant name= "Struts.devmode" value= "true"/>
<package name= "user" extends= "struts-default" namespace= "/user" >
<action name= "user" class= "com.bjsxt.struts2.user.action.UserAction" >
<result>/user_add_success.jsp</result>
</action>
</package>
</struts>
Summary: The feeling of learning is very interesting, but they do not so hard, now try to change their attitude, refueling!!!
Receive values with action