日期:2014-05-19 浏览次数:20670 次
<body> Hello World! <p>UserName:</p><html:text property="strName" name="strName" /> <p>Password:</p><html:text property="strPwd" name="strPwd"/> </body>
<form-beans > <form-bean name="myFrom" type="com.myFrom"></form-bean> </form-beans> <action-mappings> <action path="/com/myjsp" name="myFrom" parameter="method" type="com.myjspAction" validate="false" scope="request" > <forward name="success" path="/resources/mytest.jsp" /> </action> </action-mappings>
public class myFrom extends ActionForm { private String strName=""; private int age; public String getStrPwd() { return strPwd; } public void setStrPwd(String strPwd) { this.strPwd = strPwd; } private String strPwd=""; public int getAge() { return age; } public void setAge(int age) { this.age = age; } public int getWeight() { return weight; } public void setWeight(int weight) { this.weight = weight; } private int weight; public String getStrName() { return strName; } public void setStrName(String strName) { this.strName = strName; } }