Summary:
This advanced course shows JSP and servlet programmers how to build "Model-2" Web applications using the Jakarta Struts project from Apache. Students learn the Struts architecture and see how it captures a great deal of pre-existing best practice in Web application development. They build applications from scratch using the Struts 1.1 code base, advancing through actions and action mappings, form beans, and request forwarding. They use relational data at the model layer and learn to configure JDBC data sources under Struts. Throughout, the course emphasizes the great facility in Struts of using XML declarations to replace boilerplate Java coding.
The course then shifts from these controller techniques to a focus on presentation. Students learn to use various libraries of custom JSP tags: the JSP Standard Tag Library (which supersedes a number of Struts tags), Struts HTML tags for form-building and validation, and the Tiles library for robust and reusable page layouts.
Two chapters near the end of the course treat issues of effective Struts development: one focuses on "under the hood" coding techniques and one on best practices at a design level. By the end of the course, students are building complex, internationalized Web applications that validate user input, handle error conditions gracefully, and make best use and reuse of control and presentation logic through actions, form beans, validators, business and persistence JavaBeans, and Tiles.
Prerequisites:
Students should have experience with Java programming, Servlets programming, JSP, and Basic knowledge of XML.
Who Should Attend:
This course is intended for programmers who have
been programming in Java and who wish to write programs in Java using many
of the advanced Java features.
Benefits of Attendance:
Course Outline:
Chapter 1: Struts ASrchitecture
- MVC and Model 2
- Command Pattern
- Jakarta Struts
- More XML, Less Java!
- Action Mappings
- JavaBeans in Struts
- Working with Forms
- Validation
- Relational Models
- Presentation Technology
- Tiles
Chapter 2: Action Mappings
- Command Pattern for Web Applications
- ActionServlet
- Action
- ActionMapping
- Struts Configuration
- Selecting a Forward
- Global Forwards
- Forwarding Actions
- Other Action Subtypes
- Declarative Exception Handling
Chapter 3: Forms
- Working with HTML Forms
- What Not To Do
- Action Forms
- Relationship to Input
- Relationship to Actions
- Relationship to the Model
- Relationship to Output
- DynaActionForm and Map-Backed Forms
- Validation
- Coarse-Grained Form Beans
Chapter 4: Relational Data
- JDBC
- Drivers
- DriverManager (JDBC 1.0)
- DataSource (JDBC 2.0)
- Connection
- Statement
- ResultSet
- The Struts Data-Source Manager
- Multi-Tier Design
- Business Logic Beans
- Persistence Logic
- EJB
Chapter 5: Struts Tag Libraries
- Building View Components
- Struts Tag Libraries
- Attributes
- Building Forms
- <html:form>
- <html:text> et. al.
- Forms and Form Beans
- Scope and Duration of Form Data
- Managing Hyperlinks
- Error Messages
- Logic Tags
Chapter 6: The JSP Standard Tag Library
- JSTL Overview
- JSP Expression Language
- Core Tags
- Formatting Tags
- XML Tags
- SQL Tags
- Mixing JSTL, EL, Scripts and Actions
Chapter 7: Internationalization and Localization
- i18n in Java
- Locale
- ResourceBundle
- i18n in Actions
- i18n in JSTL
- i18n in Validation
Chapter 8: Input Validation
- Validation in Web Applications
- Validation in Struts
- The Struts Validator Plug-In
- Validating ActionForm Subtypes
- Configuring Validation
- Validators
- Rules
- Is <html:form> Necessary?
- Reporting Errors
- Multi-Page Validation
- Client-Side Validation
- Limitations on the Client Side
- Implementing a Validator
- Implementing ActionForm.validate
Chapter 9: Under The Hood
- Global Objects and Keys
- Modules
- ActionServlet, RequestProcessor, ExceptionHandler
- Struts Configuration in Depth
- The org.apache.struts.config Package
- Plug-Ins
- Logging with Commons and Log4J
- Configuring Log4J
- Logging in Web Applications
- The org.apache.struts.util Package
- Commons BeanUtils
Chapter 10: Best Practice
- Cardinalities in Struts Design
- Coarse-Grained Form Beans
- Many Actions from One View
- Multiple Forwards
- Many Mappings to One Action
- Chaining Actions
- Dynamic Forwarding
- Form Beans as Mediators
- Using Reflection and BeanUtils
- Reusing Validation Rules
- Mapping-Based Validation
- Graceful Validation
Chapter 11: Tiles
- Consistent Look and Feel
- Reusable Layouts and Content
- The Tiles Framework
- Instantiating Layouts
- Body-Wrap Insertions
- Tiles and Stylesheets
- Working with Tiles Attributes
- The Tiles Context
- Definitions
- Aggregation and Inheritance
- The Tiles Plug-In
- Forwarding to Definitions
- Performance Considerations
Appendix: Learning Resources
Tuition:
Tuition is $2750 per person at one of our scheduled public courses. Onsite pricing is available. Reduced rate for government personnel. Please call us at 410-956-8805 or send an email to ati@ATIcourses.com.
Register Now Without Obligation