Part I The evolution of web architecture and design 1 1 State-of-the-art web design 31.1 A brief history of Java web development 41.2 The importance of design patterns 6The Model-View-Controller design pattern 7The emergence of Model 2 9Evolution 101.3 Using frameworks 11A flavor of the Struts framework 12A flavor of the Turbine framework 14Objectively choosing a framework 201.4 Best practices 20Business rules 20Where should the rules reside? 22Leveraging best practices 241.5 Summary 252 Building web applications 27 2.1 Building web applications with servlets 29The eMotherEarth servlet application 29Evaluating the servlet approach 502.2 Building web applications with JSP 50The JSP eMotherEarth application 51Evaluating the JSP approach 592.
3 Summary 603 Creating custom JSP tags 61 3.1 The case for custom tags 623.2 The tag interfaces 63The Tag interface 63The IterationTag interface 64The BodyTag interface 653.3 Building simple tags 66The HtmlSqlResult tag 66Registering the tag 713.4 Validating tag attributes 75Adding DbPool to the application tag 753.5 Using prebuilt tags 80Using JSTL 81Using other taglibs 843.6 Custom tag considerations 86Resource usage 87Building a framework 883.7 Now that weíre here, where are we? 883.
8 Summary 89 4 The Model 2 design pattern 91 4.1 Using Model 2 as your framework 92The Model 2 schedule application 93Options in Model 2 1164.2 Parameterizing commands with controller servlets 117An example of parameterizing commands 118Advantages and disadvantages 1274.3 Summary 128Part II Web frameworks 131 5 Using Struts 133 5.1 Building Model 2 Web applications with Struts 134The Struts schedule application 134Value objects as form beans 136Objectifying commands with Strutsí actions 137Configuring Struts applications 139Using Strutsí custom tags to simplify JSP 142Internationalization with Struts 145Strutsí support for data entry 147Declarative validations 1515.2 Evaluating Struts 1565.3 Summary 1576 Tapestry 159 6.1 Overview 1606.
2 The architecture 1606.3 A simple Tapestry application 162Tapestry Hello, World 1626.4 The Tapestry framework 167Framework classes and interfaces 167Components 1706.5 Scheduling in Tapestry 173Bootstrapping the application 173The Home page 176The custom table component 180The Add page 1856.6 Evaluating Tapestry 192Documentation and samples 192Debugging support 195Using Tapestry 1966.7 Summary 1977 WebWork 199 7.1 Overview 200The architecture 201The configuration 2027.2 Key concepts 203Actions 204Key interfaces 204The value stack 205Expression language 206BeanInfo classes 207Templates 2077.
3 Scheduling in WebWork 208The configuration 208The View page 209The Add page 214Validations 2207.4 Evaluating WebWork 2247.5 Summary 2268 InternetBeans Express 227 8.1 Overview 2288.2 The architecture 230DataExpress 230InternetBeans Express 2338.3 InternetBeans Express components 234ixPageProducer 234ixComponents 2368.4 Scheduling with InternetBeans 237Data connectivity 238The View page 242The Add page 245Validations 2498.5 JSP custom tags 2558.
6 Evaluating InternetBeans Express 257Documentation and samples 257Using InternetBeans Express 2588.7 Summary 2599 Velocity 261 9.1 Overview 2629.2 The architecture 2639.3 Key concepts 265Setting up Velocity 265The Velocity Template Language 268Context 2699.4 Scheduling with Velocity 269The View page 271The Add page 274Validations 2789.5 Evaluating Velocity 281Documentation and samples 281Using Velocity 2829.6 Summary 28210 Cocoon 283 10.
1 Overview 28410.2 The architecture 285The publishing framework 285The web framework 28810.3 Key concepts 289The publishing framework 289The sitemap 295The web framework 29910.4 Scheduling in Cocoon 302The sitemap 303The action 304The view 30510.5 Evaluating Cocoon 307Documentation and samples 307Source code 308Debugging 30810.6 Summary 30911 Evaluating frameworks 311 11.1 Evaluation criteria 312Suitability to the application 312Do.