Hi,
Even after changing ename to userAge it doesn't work.
I am getting the same problem. not rectify.
here is the UserRegistrationForm (formbean)
-----------------------
package multipleform;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import javax.servlet.http.HttpServletRequest;
public class UserRegistrationForm extends ActionForm {
private
String firstName;
private String lastName;
private String userName;
private String password;
private String passwordCheck;
private String email;
private String phone;
private String fax;
private String userAge;
private boolean registered;
public UserRegistrationForm() {
}
public String getFirstName() {
return this.firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getLastName() {
return this.lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getUserName() {
return this.userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPasswordCheck() {
return this.passwordCheck;
}
public void setPasswordCheck(String passwordCheck) {
this.passwordCheck = passwordCheck;
}
public String getPhone() {
return this.phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getFax() {
return this.fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getUserAge() {
return this.userAge;
}
public void setUserAge(String userAge) {
this.userAge = userAge;
}
public boolean getRegistered() {
return this.registered;
}
public void setRegistered(boolean registered) {
this.registered = registered;
}
public void reset(ActionMapping mapping,
HttpServletRequest request) {
firstName=null;
lastName=null;
userName=null;
password=null;
passwordCheck=null;
email=null;
phone=null;
fax=null;
userAge=null;
registered=false;
}
private String[] defaultValues ={ firstName, lastName, userName, password,passwordCheck,email,phone,fax };
public boolean isMissing(String value) {
if ((value == null) || (value.trim().equals(""))){
return(true);
} else {
for(int i=0; i<defaultValues.length; i++) {
if (value.equals(defaultValues[i])) {
return(true);
}
}
return(false);
}
}
}
----------------------
multipleform1.jsp is as:
------------------------
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<html>
<head>
<title>User Registration</title>
</head>
<body>
<h1>User Registration</h1>
<html:errors/>
<table>
<html:form action="/userRegistration1">
<tr>
<td>
Emp Name:
</td>
<td>
<html:text property="userAge"/>
</td>
</tr>
<tr>
<td>
<html:submit/>
</td>
<td>
<html:cancel/>
</td>
</tr>
</html:form>
</table>
</body>
</html>
---------------------
Please reply soon.
Thanks