Description: This hands-on course provides participants with the knowledge and experience necessary to develop and deploy large, robust and complex Java web applications utilizing the Apache Struts 1 framework. The Apache Software Foundation has provided numerous open-source tools, which set the standard for web application development. These include the Apache web server and the Tomcat Servlet Container. Apache Struts 1 provides a flexible controller layer for JSP-based applications, with significant facilites for validation, internationalization and page layout. Struts is an implementation of the Model-View-Controller (MVC) pattern, a recommended architectural design pattern for interactive applications. The Struts controller is based on standardized technologies including Servlets, JSP Pages, Tag libraries, JavaBeans and XML. Students will learn how to use the Struts framework to write, assemble, configure and deploy complex web applications. Comprehensive hands-on lab exercises reinforce instructor lectures and build direct competence in the topics presented throughout the course.
This course assumes that students possess a thorough knowledge of how to use Servlets, Java Server Pages, Tag Libraries, ANT and JDBC to exploit the services of the Java EE platform.
Prerequisites: Java programming experience and an understanding of object-oriented design principles. Thorough knowledge of the use and deployment of Servlets, JSPs, Tag libraries and JDBC.
Overview of Topics Covered:
Enterprise Application Architecture
Issues in Building Web Applications
Web Development Challenges
Frameworks and Design Patterns
The Model-View-Controller Pattern
Benefits of MVC
Struts and MVC
Struts Core Technologies
The Struts Controller
Struts in Action
The Struts Model
The Struts View
Basic Struts Development Process
Introduction to Struts
Installing Struts
Struts Libraries
Struts Configuration Files
Deploying Resource Bundles
Deploying to Tomcat
Developing the Struts Controller
Registering the Action Servlet
Editing the web.xml File
The struts-config.xml file
Defining action mappings and forwards
Defining an Action Form
Defining Form Properties
Dynamic Action Forms
Developing Struts Actions
Forwarding From an Action
Using Predefined Actions: ForwardAction, IncludeAction, DispatchAction
Developing the Struts View
Using JSP Pages for the View
Using Struts Tag libraries
Struts HTML tags for Form Layout
Struts Logic Tags
Using JSTL (Java Standard Tag Library)
Internationalization
Understanding Locales
Setting the Struts Locale
Locale-specific Output
Developing Locale-Specific Resource Bundles
Selecting Character Encodings
Using the LookupDispatchAction
Developing the Data Model
Decoupling the Model
Developing Business Objects
Accessing JDBC DataSources
Displaying Errors and Messages
Defining Messages
Returning Action Messages
Displaying Error Lists
Input Validation
Struts Features for Validation
Form Validation
Using the Validator Plug-in
Displaying Validator Messages
Enabling AJAX-based Validation
Laying out Pages with Tiles
Building a Tile Layout
Developing a Template
Using The Tiles Plug-In
Defining tiles in tiles-defs.xml
Extending Tiles Definitions
Forwarding to Tile Definitions
Customizing the Struts Controller
Inside the Struts ActionServlet
Configuring the RequestProcessor
Defining Commands
Dividing an Application into Modules
Logging and Debugging
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.