The View Component: The HTML Form and the Form Bean

For this application, the best place to start is with the View component. The View in this case is made up of a JSP file and a Struts form bean.

Figure 3.1 shows the HTML form for this application. This is the only HTML page in the application.

Figure 3.1. The Hello World! application.

Listing 3.1 shows the JSP file used to create this HTML page. (This book assumes that you have a basic understanding of Java and JSP, so the discussion around Listing 3.1 will focus on the Struts portions of the file.)

Listing 3.1. The JSP File for the Hello World! Application (hello.jsp)
 <%@ page contentType="text/html;charset=UTF-8" ...

Get Struts Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.