Java Reference
In-Depth Information
Figure 4-10.
Form of the HelloWorld project
When you submit an HTML form in a Struts 2 web application, the input is sent to the Java class
called
Action
. After the action executes, a result selects a resource to render the response, as
illustrated in Figure
4-11
.
Figure 4-11.
Greeting the user
Let's modify the HelloWorld project you created earlier to add an action, the form that accepts a
user's input, and the view that greets the user, as illustrated in the directory structure shown in
Figure
4-12
.