*Design and implement flexible, extensible, and maintainable applications with servlets and JSP technology*Master powerful authentication and internationalization techniques*Learn how to integrate industry-standard XML and XSLT with JSP technology*Use JSP technology-based templates to develop robust applications from modular componentsAdvanced JavaServer Pages delivers: *Web application design techniques based on JSP and servlets technology*Proven strategies for achieving enterprise-class robustness and scalability with JSP technology*Expert guidance on implementing JSP technology-based applications with reusable componentsTo fully exploit the power of JavaServer Pages technology in Web application development, based on J2EE technology, you need to master the sophisticated server-side techniques that David Geary presents in Advanced JavaServer Pages. Geary tackles JavaServer Pages technology with the same exhaustive, authoritative approach that made his Graphic Java books into worldwide best sellers. He presents in-depth coverage of advanced topics including: *Implementing custom JSP technology tags*Designing scalable and extensible Web applications*Using authentication to build se
Preface Acknowledgements 1. Custom Tag Fundamentals.
Using Custom Tags-The JSP File. Defining Custom Tags-The TLD. Implementing Custom Tags-Tag Handlers. Specifying the TLD in WEB-INF/web.xml. The Tag Life Cycle. Thread Safety. Tags with Attributes. Accessing Page Information. Error Handling. The Tag Package. The Tag Interface. The TagSupport Class: Ancestors, Values, and Ids. Tags with Bodies. Conclusion.2. Custom Tag Advanced Concepts.
Encapsulating Layout. Sections, Regions, and Templates. Optional Content. Role-based Content. Defining Regions Separately. Nesting Regions. Extending Regions. Combining Features. Region Tag Implementations. The Beans. The Tag Handlers. Conclusion.5. Design.
Model 1. Model 2: An MVC Approach. A Model 2 Example. The Beans. The Deployment Descriptor. Successful Login Use Case. Creating a New Account. Conclusion.6. Framework.
A Model 2 Framework. The Action Interface. The Action Factory. Action Routers. The Action Servlet. Retrofitting the Original Model 2 Example. Refining the Design. Adding Use Cases. Step #1: Implement a Password Hint Action. Step #2: Implement a Password Hint JSP. Step #3: Add Mappings to the Properties File. Step #4: Modify the Login Failed JSP Page. The Importance of Custom Tags. JSP Scripts. Conclusion.7. Event Handling and Sensitive Form Resubmissions.
Event Handling for a Model 2 Framework. Sensitive Form Resubmissions. Trapping Form Resubmissions with a Model 2 Framework. Trapping Form Resubmissions Without a Framework. Conclusion.8. I18n.
Unicode. Charsets. Non-Latin-based JSP Pages. Multilingual JSP Pages. Locales. Resource Bundles. List Resource Bundles. Using Constants for Resource Keys. Property Resource Bundles. Multiple Resource Bundles. A Bundle Cache. Formatting Locale-Sensitive Information. Dates and Times. Numbers, Currency, and Percents. Messages. Browser Language Preferences. Detecting Locales. Locating Resource Bundles. Custom Tags. A Message Tag. A Format Tag. Conclusion.9. Security.
Servlet Authentication. Principals and Roles. Declarative Authentication. Portability. Types of Authentication. Basic Authentication. Digest Authentication. Form-Based Authentication. SSL and Client Certificate Authentication. Customizing Authentication. Resin. Tomcat 4.0. Web Application Security Elements. Programmatic Authentication. Conclusion.10. Databases.
Database Creation. Data Sources. Database Custom Tags. The Query Tag. The ColumnNames Tag. The Columns Tag. The Rows Tag. The Release Tag. Connection Pooling. Using a Connection Pool. Creating a Connection Pool. Implementing a Simple Connection Pool. A More Capable Resource Pool. Prepared Statements. Transactions. Scrolling Through Result Sets. Conclusion.11. XML.
Generating XML. Generating XML with Beans. Beans That Generate Their Own XML. Generating Beans from XML. Postprocessing XML. Parsing XML. Simple API for XML (SAX). SAX Custom Tags. Document Object Model (DOM).DOM Custom Tags. Transforming XML. Using JSP and XSLT Together. Using XSLT in a Custom Tag to Produce HTML. Using XSLT to Produce JSP at Compile Time. Using XSLT at Compile Time Vs. Runtime. Using Xpath. Conclusion.12. A Case Study.
The Fruitstand. The Homepage. Going Shopping. The Storefront. The Shopping Cart. The Checkout. The Purchase. The Model 2 Framework. A The Model. The Views-JSP Pages and Templates. The Controllers-Servlets and Actions. Internationalization. Authentication. HTML Forms. Sensitive Form Resubmissions. SSL. XML and DOM. Conclusion.Servlet Filters. Index.