O'Reilly logo

Struts Kick Start by Kevin Bedell, 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

Applying the Model-View-Controller Pattern

The Struts Model-View-Controller architecture will be a good fit for this application. Here’s how it will work:

  • The Model component will be a Java bean that has basic set/get methods for reading and writing the name entered by the user. In this case, there also will be a method to save the data. In a more complex application, the Model may be a front for an EJB or Web service.

  • The View will be a single JSP file that presents information to the user. In addition, the View will also include a Struts form bean. A form bean is a regular Java bean with a couple of additional methods included to allow input resetting and validation.

  • The Controller component will be a Struts Action class. Action classes are ...

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