Chapter 2. Saying hello to Struts 2
Listing 2.1. XML declarative architecture elements
Listing 2.2. Using annotations for declarative architecture
Listing 2.3. The web.xml deployment descriptor of our sample application
Listing 2.4. The entry point into XML-based declarative architecture
Listing 2.5. Using XML for declarative architecture
Listing 2.6. Using Struts 2 UI component tags to render the form
Listing 2.7. The HelloWorld action’s execute() does the work
Listing 2.8. HelloWorld.jsp renders the result for the HelloWorld action
Chapter 3. Working with Struts 2 actions
Listing 3.1. Transferring request data to the action’s JavaBeans properties
Listing 3.2. Declaration of a package
Listing 3.3. The struts-default package declares many commonly used components
Listing 3.4. Declaration of DefaultWorkflowInterceptor from struts-default.xml
Listing 3.5. The Register action provides validation logic in the validate() method.
Listing 3.6. Using ActionSupport to get the validation error messages
Listing 3.7. Collecting data and building the domain object by hand
Listing 3.8. Using an object-backed property to receive data transfers
Listing 3.9. Automatically transferring request data to application domain objects
Listing 3.10. Declaring the FileUploadInterceptor and adding it to the stack
Listing 3.11. Extending the struts-default package to inherit file upload processing
Listing 3.12. The JavaBeans properties that’ll receive the uploaded file and metadata