O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The ActionForm

When one of the Submit buttons is hit, the controller looks up the name of the requested ACTION in the struts-config.xml file. In this case, it finds that the page requested /myAccount and therefore needs to store any form data into accountForm (see Listing 16.3) through introspection. accountForm just holds the values in normal bean property fashion.

Listing 16.3. accountForm.java
 package com.bfg.struts; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class accountForm extends ActionForm { protected String action; protected String cardIndex; protected int addressIndex; public void setAction(String ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required