The JSP pages and ActionForm beans work hand-in-hand in Struts because the JSP submits the user input to the bean, and the bean returns validation errors to the JSP.
To understand how they work together, take a look at one ActionForm and the JSP page it relates to. Listing 7.1 shows the NewUserForm bean, which is the ActionForm for the create account screen of the application.
This file is available on the companion CD with this book.
package stocktrack.struts.form; import javax.servlet.http.*; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionForm; import stocktrack.struts.form.BaseForm; ...