Java Reference
In-Depth Information
Listing 4-18 illustrates index.jsp.
Listing 4-18. index.jsp
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>
Deploy the web application to the servlet container Tomcat 7, open a web browser, and access
http://localhost:8080/helloworldStruts2/ , as illustrated in Figure 4-9 .
Figure 4-9. Running the HelloWorld application
The HelloWorld application you developed didn't comprise any actions but a single JSP file that was
generated when you created the project. The purpose of the HelloWorld application you created was
to test the configuration of Struts 2. You will create actions in the following section.
You will create a HelloWorld project that displays a welcome message to the user, as illustrated in
Figure 4-10 .
 
Search WWH ::




Custom Search