
In our LoginAction,we retrieved the form values using the conventional methods in HttpServletRequest. Struts provides an easy way to retrieve these values with the help of form beans. A form bean is a simple JavaBean that extends from org.apache.struts.action.ActionForm. We already have a JavaBean “User” but that does not extend from ActionForm. We can reuse this JavaBean for this purpose. Let’s add the extends clause to the User class so that the signature of the class becomes
public class User extends ActionForm
Also we need to add a no-argument constructor to the User class to enable the struts framework to instantiate the bean.
public User(){
super();
}
Jsp Discussion
- - Two forms in one JSP
- - PASS VARIABLES BETWEEN 2
- - Table data
- - Unable to laod the image
- - The Ultimate Web UI Frame




