- Tel: +44 (0)1275 859666
EC37 - Struts Web Development Framework - 3 Days
Course Description
This course is intended for programmers who have been programming in Java servlets and JSPs, and who wish to write programs using many of the advanced features.
Pre-requisites
Students should have experience with Java programming, Servlets programming, JSP, and Basic knowledge of XML.
Objectives
Apache Jakarta Struts shows JSP and servlet programmers how to build Web applications using the Jakarta Struts project from Apache. Delegates learn the Struts architecture and see how it captures a great deal of pre-existing best practice in Web application development.
Delegates learn how to build applications from scratch using the Struts 1.2 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 emphasises the great facility in Struts of using XML declarations to replace boilerplate Java coding. At the end of this course, delegates will be able to:
- Use Struts actions and action mappings to take control of HTTP requests/responses.
- Manage HTML form input and output with form beans, and use these beans to simplify data handling in the controller.
- Use persistent data in a Struts application with JDBC.
- Use JSTL and Struts custom tags to build robust and reusable JSP presentation logic.
- Support multiple client locales with various internationalization techniques.
- Define validation rules for input forms, and provide clear user feedback.
- Build complex presentations using decoupled, reusable tiles, screens and layouts.
Customisation
For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.
Course Details
- INTRODUCTION
- 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
- Jakarta Struts
- 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
- ActionServlet
- 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
- What Not To Do
- RELATIONAL DATA
- JDBC
- Drivers
- DataSource
- Connection
- Statement
- ResultSet
- The Struts Data-Source Manager
- Multi-Tier Design
- Business Logic Beans
- Persistence Logic
- Drivers
- EJB
- 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
- THE JSP STANDARD TAG LIBRARY
- JSTL Overview
- JSP Expression Language
- Core Tags
- Formatting Tags
- XML Tags
- SQL Tags
- Mixing JSTL, EL, Scripts and Actions
- Building View Components
- INTERNATIONALIZATION and LOCALIZATION
- i18n in Java
- Locale
- ResourceBundle
- i18n in Actions
- i18n in JSTL
- i18n in Validation
- 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
- Locale
- STRUTS TECHNOLOGIES
- 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
- Common BeanUtils
- Modules
- WORKING WITH STRUTS
- 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
- Coarse-Grained Form Beans
- 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
- Reusable Layouts and Content
Course Format
Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given.