Course Description
This three-day Java Struts training course will teach students how to use Java Struts as a framework to develop web applications that follow the Model/View/Controller design pattern. The topics cover the components of Struts that are available from the Jakarta project of the Apache Foundation. The course illustrates what the components provide and use of them.
Pre-requisites
Knowledge of Java Programming, Java Web Programming, or Java 2 Enterprise Edition. Java Servlet and JSP programming experience, and a basic understanding of HTML and XML is required.
Who is this course for?
This course is designed for experienced Java Servlet and JSP developers who need to use Java Struts as a framework for MVC Web Application Development.
Course content
Struts Overview
What is Struts
Model 1 Design Pattern
Model 2 / MVC Design Pattern
Implementing MVC with a Framework
The Struts Framework
Basic Struts Components
Struts Documentation
A Struts-based Application: Logon
Model 1 Design Pattern
Model 2 / MVC Design Pattern
Implementing MVC with a Framework
The Struts Framework
Basic Struts Components
Struts Documentation
A Struts-based Application: Logon
Struts in a Simple Web Application
Stars Information Application
List Stars Flow
Display Stars Flow
ActionServlet:theController
struts-config.xml
ActionForm: Form State
The execute Method of StarsListAction
The execute Method of StarsDisplayAction
Direct Processing Flow with ActionForward
Building a View with Tags
List Stars Flow
Display Stars Flow
ActionServlet:theController
struts-config.xml
ActionForm: Form State
The execute Method of StarsListAction
The execute Method of StarsDisplayAction
Direct Processing Flow with ActionForward
Building a View with Tags
The Controller
ActionServlet as Controller
RequestProcessor
Developer Responsibilities
Mapping
Forwards
Lifecycle of an ActionForm
ActionForm Considerations
The reset Method
The validate Method
RequestProcessor
Developer Responsibilities
Mapping
Forwards
Lifecycle of an ActionForm
ActionForm Considerations
The reset Method
The validate Method
Action and the Business Model
The execute Method of Action
execute() Method Considerations
Handling an Error
Threading Considerations
Best Practices for Action
execute() Method Considerations
Handling an Error
Threading Considerations
Best Practices for Action
The View
Forwarding to a View
Overview of Struts Tags
Struts HTML Tags
Form-related Tags
Dealing with URLs
Using Error Tags
Displaying Messages
Struts Bean Tags
Struts Logic Tags
Struts View Best Practices
Overview of Struts Tags
Struts HTML Tags
Form-related Tags
Dealing with URLs
Using Error Tags
Displaying Messages
Struts Bean Tags
Struts Logic Tags
Struts View Best Practices
Internationalisation
I18N and L110N
Resource Bundles
Java’s MessageFormat Class
Internationalisation in Struts
I18N with Struts Tags
I18N with JSTL Tags
I18N with Java Code
Resource Bundles
Java’s MessageFormat Class
Internationalisation in Struts
I18N with Struts Tags
I18N with JSTL Tags
I18N with Java Code
Advanced Struts Features
Accessing Bean Properties
DynaActionForm: A Configurable Form
Indexed & Mapped properties in a Form
Using indexed=”true”
Preventing Duplicate Form Submits
Using ForwardAction & IncludeAction
DispatchAction
LookupDispatchAction
DynaActionForm: A Configurable Form
Indexed & Mapped properties in a Form
Using indexed=”true”
Preventing Duplicate Form Submits
Using ForwardAction & IncludeAction
DispatchAction
LookupDispatchAction
Handling Errors
Error Handling with Struts
Documenting Errors with ActionMessage
JSP Error Pages
Declarative Java Exception Handling
Logging in Struts
Documenting Errors with ActionMessage
JSP Error Pages
Declarative Java Exception Handling
Logging in Struts
Validation
Validator Overview
Validator Requirements
Configuring Validator Rules
Struts Validators
Configuring the Struts Validators
Configuring Form Validation — global and formset
Configuring Form Validation — form and field
Configuring Form Validation — arg
Configuring Form Validation — var
Validation with Regular Expressions
ValidatorForm verses ValidatorActionForm
Implementing a Validator Method
Other Validator Implications
Validator Requirements
Configuring Validator Rules
Struts Validators
Configuring the Struts Validators
Configuring Form Validation — global and formset
Configuring Form Validation — form and field
Configuring Form Validation — arg
Configuring Form Validation — var
Validation with Regular Expressions
ValidatorForm verses ValidatorActionForm
Implementing a Validator Method
Other Validator Implications
Page Composition with Tiles
Tiles Overview
Building a Tiles Template
Basic Tiles Example
Tiles Definitions
Additional Options with Definitions
Placing Definitions in a Configuration File
Using the <put> Tag
Enabling the Tiles Plug-In
Using Tiles
Building a Tiles Template
Basic Tiles Example
Tiles Definitions
Additional Options with Definitions
Placing Definitions in a Configuration File
Using the <put> Tag
Enabling the Tiles Plug-In
Using Tiles
Nested Tags
Why Nested Tags?
Using Nested Tags
Parent and Root Tags
Using Nested Tags
Parent and Root Tags