Course JAV107
Java Struts2 Web Application Development
Java Struts2 Web Application Development
Duration: 5 Days
Course Synopsis
This course covers web application development using the Struts2 framework. It covers use of associate tools and technologies such as ONGL , Freemarker, Jasper reports, and Sitemesh
Course Objectives
By the end of the course student should know and understand
- The design and realisation of Struts2 based web applications
- Effective use of the Struts2 validation framework for the detection and reporting of user input errors
- Data access and result generation - using e.g. OGNL, JSP and Freemarker
- Make effective use of the Struts2 Tag Library
- Make effective use of Ajax in developing Struts2 applications
- How to integrate Servlets, JSPs and EJBs into applications
The course is aimed at
- Java programmers tasked with the development of Struts2 framework based web applications
Prerequisites
- Students are expected to have experience of Java programming and an understanding of Servlets, Java Server Pages (JSPs), HTML and JavaScript
Publicly scheduled dates, locations, and prices
A schedule of dates for this subject is not currently available. Please call Ajay Patel on 02086471939 to enquire about places and availability.
Course Outline
Getting started with Struts2
- Overview of Struts2 - Rationale and Architecture
- Overview of a typical Eclipse based Struts2 development environment
- Model View Controller (MVC) paradigm as used in Struts2
- Overview of Filters, Servlets, JSP, Web application architectures
- Overview of key Struts2 elements - Interceptors, Actions, Results and FilterDispatchers
- Obtaining and installing Struts2
- Overview of Tomcat and setting up Tomcat to work with Struts2
- Overview of the Eclipse IDE and how to use it to develop Struts2 applications
Building a basic Struts2 application
- Exploring the Struts2 components
- Realising the request processing cycle
- Using configurations to link flows
- Understanding and editing the web.xml and structs.xml configuration files
- Using the Inversion of Control principle to build dependencies
Implementing Struts Actions
- Controlling application flow - use of the ActionSupport based class
- ModelDriven actions
- Unit testing of actions
- Message localisation
Mapping the Model to the View
- Custom tags - an overview
- Struts tags
- UI Tags
- Generic Tags
- Tag References
- Themes and templates
- Ajax tags
- OGNL's push-pull processing model
- Reading and writing object properties
- Working with complex data types - lists, sets, maps
- The Value Stack and data manipulation
- OGNL operators and navigation of complex data graphs
- Use of non-property methods
Gathering and Validating User Input
- Struts2 Views
- Generating pages using Struts2 tags
- Utilising the Struts 2 On-Demand model for data access
- Using model data to control page flow
- Struts2 Validation Architecture
- Overview of the Struts2 validation model
- Build in validation rules
- Validation interceptors
- Handling Validation Failures
- Extending the Validation Framework
- Creating custom validation rules
- Using Struts2 annotations to configure validation
- Validation interceptors
- Combining custom validation with built-in validation rules
Struts2 Interceptors
- Interceptor Architecture
- The interceptor role
- The interceptor chain in request processing
- Capabilities of the default interceptor stack
- Extending the built-in Interceptor functionality
- Implementing custom application specific interceptors
- Using annotations to simplify interceptor configuration
Dynamic View Generation
- Request dispatching
- Choosing the correct output page
- Combining multiple actions into a single logical sequence
- Using the plug-in architecture to enable other result types
- Generating template-driven output using SiteMesh
- Installation and configuration of SiteMesh to work with Struts2
- Understanding the SiteMesh decorator and composite patterns
- Implementing a SiteMesh decorator
Enhancing the User Interface
- Using Struts2 presentation tags
- Layout specification and templates
- Incorporating the Ajax API into Struts2
