
UserAction.java
/*包和引入文件*/
public class UserAction extends ActionSupport {
private String name;
private String id;
private String age;
/*set get方法*/
public String addUser()
{
return SUCCESS;
}
public String execute()
{
return SUCCESS;
}
}
struts.xml
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
excep.jsp
/*head*/
This is my JSP page.