| Acknowledgments | xix |
Part I | The Struts Framework | |
1 | An Introduction to Struts | 3 |
| A Brief History of Web Application Development | 3 |
| Two Development Models | 5 |
| A Closer Look at the Model-View-Controller Architecture | 7 |
| Enter Struts | 7 |
| Basic Components of Struts | 9 |
| Acquiring Struts | 10 |
| Getting Started with Struts | 11 |
2 | Building a Simple Struts Application | 13 |
| Application Overview | 13 |
| Compiling, Packaging, and Running the Application | 39 |
| Understanding the Flow of Execution | 44 |
3 | The Model Layer | 47 |
| What Is the Model? | 47 |
| Struts and the Model | 48 |
| Reviewing the Model Layer of the Mini HR Application | 49 |
4 | The View Layer | 53 |
| Struts and the View Layer | 53 |
| Reviewing the View Layer of the Mini HR Application | 64 |
| Alternative View Technologies | 69 |
5 | The Controller Layer | 71 |
| Struts and the Controller Layer | 71 |
| The ActionServlet Class | 72 |
| The RequestProcessor Class | 74 |
| The Action Class | 76 |
| The ActionForward Class | 87 |
| Reviewing the Controller Layer of the Mini HR Application | 89 |
6 | Validator | 91 |
| Validator Overview | 92 |
| Using Validator | 92 |
| Creating Custom Validations | 103 |
| Internationalizing Validations | 108 |
| Adding Validator to the Mini HR Application | 110 |
7 | Tiles | 117 |
| Tiles Overview | 119 |
| Using Tiles | 119 |
| Internationalizing Tiles | 126 |
| Using the Tiles Tag Library | 129 |
| The Tiles Tag Library Tags | 130 |
| Adding Tiles to the Mini HR Application | 141 |
8 | Declarative Exception Handling | 151 |
| Configuring Struts' Exception Handler | 152 |
| Creating a Custom Exception Handler | 153 |
| Adding Declarative Exception Handling to the Mini HR Application | 156 |
9 | Struts Modules | 163 |
| Using Modules | 164 |
| Using Validator with Modules | 167 |
| Using Tiles with Modules | 168 |
| Converting the Mini HR Application to Use Modules | 169 |
10 | Internationalizing Struts Applications | 177 |
| Understanding Java's Internationalization Support | 177 |
| Understanding Struts' Internationalization Support | 181 |
| Internationalizing the Mini HR Application | 185 |
Part II | The Struts Tag Libraries | |
11 | The HTML Tag Library | 195 |
| Understanding Variables and Scope in JSP Pages | 195 |
| Using the HTML Tag Library | 196 |
| The HTML Tag Library Tags | 197 |
| Common Tag Attributes | 251 |
12 | The Bean Tag Library | 255 |
| Understanding Variables and Scope in JSPs | 255 |
| Using the Bean Tag Library | 256 |
| The Bean Tag Library Tags | 257 |
13 | The Logic Tag Library | 283 |
| Understanding Variables and Scope in JSPs | 283 |
| Using the Logic Tag Library | 285 |
| The Logic Tag Library Tags | 285 |
14 | The Nested Tag Library | 325 |
| Understanding Object Nesting in Struts | 325 |
| Using the Nested Tag Library | 327 |
| The Nested Tag Library Tags | 327 |
15 | Using JSTL with Struts | 333 |
| JSTL Overview | 333 |
| Using JSTL with Struts | 340 |
Part III | Struts Configuration Files | |
16 | The Struts Configuration File | 353 |
| Understanding XML DTDs | 353 |
| Configuring the web.xml Deployment Descriptor | 354 |
| The Struts Configuration File Tags | 356 |
| Metadata Tags | 375 |
| Editing Struts Configuration Files with Struts Console | 375 |
17 | The Tiles Configuration File | 377 |
| Understanding XML DTDs | 377 |
| Enabling the Tiles Plugin | 378 |
| The Tile Configuration File Tags | 379 |
| Metadata Tags | 386 |
| Editing Tiles Configuration Files with Struts Console | 387 |
18 | The Validator Configuration Files | 389 |
| Two Configuration Files | 389 |
| Understanding XML DTDs | 390 |
| Enabling the Validator Plugin | 391 |
| The Validator Configuration File Tags | 391 |
| Editing Validator Configuration Files with Struts Console | 405 |
Part IV | Applying Struts | |
19 | Securing Struts Applications | 409 |
| Levels of Security | 409 |
| Using Container-Managed Security | 412 |
| Application-Managed Security | 420 |
20 | Testing Struts Applications | 435 |
| Types of Testing | 435 |
| Unit Testing Struts Applications | 436 |
| Use-Case-Driven Testing | 453 |
| Testing Application Performance | 458 |
Part V | Appendix | |
A | Struts Console Quick Reference | 465 |
| Acquiring and Installing Struts Console | 468 |
| Using Struts Console as a Stand-alone Application | 468 |
| Using Struts Console Inside Borland JBuilder | 470 |
| Using Struts Console Inside Eclipse | 472 |
| Using Struts Console Inside IBM WebSphere Studio Application Developer | 475 |
| Using Struts Console Inside IntelliJ IDEA | 478 |
| Using Struts Console Inside NetBeans and Sun Java Studio | 480 |
| Using Struts Console Inside Oracle JDeveloper | 482 |
| Configuring the Struts Console Output Options | 484 |
| Index | 487 |