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 ...