Skip Navigation Links

Course Length:
3 Days
Course Description:
This course introduces the students to Jakarta Struts 1.2. During the course, students will learn to design and develop Struts based applications. Students learn how to incorporate JSPs, servlets, EJBs and JavaBeans into their design. Corresponding to every chapter, there is a lab reinforcing the concept.
Who Should Attend:
This course is intended for programmers and designers who want to design and develop applications using the Jakarta Struts Model-View-Controller (MVC) framework.
Benefits of Attendance:
Upon completion of this course, students will be able to:
  • Understand and explain the Jakarta Struts framework
  • Design and build Struts based applications
  • Use MyEclipse to create a simple Struts application
  • Develop a simple custom tag lib
  • Use The Struts Tag Lib
  • Use the DynaActionForm and Validator feature of Struts 1.2.
Prerequisites:
Students should have a good understanding of HTML and object-oriented programming using Java. Students should also have experience with JSPs and servlets with some understanding of JavaBeans or EJBs.
Course Outline:
  • Struts Architecture and Overview
    1. Review: MVC Model
    2. Review: Request, Session and Application
    3. What is Struts?
    4. Struts Flow
    5. Components in Struts
    6. The Model
    7. The View
    8. The Controller
    9. Struts Flow
    10. struts-config.xml
    11. struts-config.xml Content
    12. The <data-sources> element in the struts-config.xml
    13. The <form-beans> element in the struts-config.xml
    14. The <global-forwards> element in the struts-config.xml
    15. The <action-mappings> element in the struts-config.xml
    16. Sample struts-config.xml
    17. The Role of web.xml for the Application
    18. Configuring Struts in the web.xml
    19. web.xml Content
    20. Steps to Configuring Struts in the web.xml
  • The First Struts Application
    1. The application
    2. The Structure
    3. Setup Needed
    4. Directory Structure
    5. index.jsp
    6. The index.jsp Page
    7. struts-config.xml
    8. MultiplyForm.java
    9. MultiplyAction.java
    10. result.jsp
    11. The result page
    12. ApplicationResources.properties
  • Development of Struts Applications Using RAD V7
    1. Directory Structure of a Struts Application
    2. RAD Struts Support
    3. Create a Struts Web Application Project
    4. View the Struts Project Structure
    5. Create a Struts JSP
    6. Insert Struts Tags
    7. Creating a Struts Form Bean
    8. Create a Struts Action
    9. Edit a Struts Configuration File
  • Struts Development Cycle
    1. Gathering Requirements
    2. Defining Screen Requirements
    3. Detailed screen design
    4. Determining the Screen Flow
    5. Defining the ActionMappings in the struts-config.xml
    6. Struts view components – Data vs. ActionForm Bean
    7. Defining Screen Requirements – define FormBean
    8. Developing the FormBean
    9. Developing the FormBean – The reset( ) Method
    10. Developing the FormBean – The validate( ) Method
    11. Developing the FormBean – ActionErrors
    12. Developing the FormBean – Defining the Message Key
    13. Developing the Action Class – action and Action Class
    14. Developing the Action Class
    15. Developing Actions –
    16. The execute() Method
    17. Developing Actions – ActionForward
    18. Developing Actions – ActionMapping class
    19. Developing Actions – execute() example
    20. execute() Method Example:
    21. Developing Business Logic – EJBs
    22. Developing JSPs
    23. Configuring
    24. struts-config.xml and web.xml
    25. Build, Pack, and Deploy
  • Struts Tag Libraries
    1. Commonality among the Struts Tags
    2. Bean Tags
    3. HTML Tags
    4. Logic Tags
    5. Logic Tags functionality
  • Struts Extensions, Internationalization and Error Handling
    1. Struts Extensions
    2. Extension Points
    3. Plug-ins
    4. Custom Configuration Class
    5. Writing a Configuration Class
    6. Custom ActionServlet
    7. Custom RequestProcessor
    8. Base Action Class
    9. Base Form Bean
    10. Custom JSP Tags
    11. Internationalization (I18N)
    12. Error Handling
    13. The ActionError class
    14. Error Handling : validate() method of ActionForm
    15. Displaying the errors found in the validate method
    16. Error Handling : execute() method of Action
    17. Declarative Exception Handling
    18. Syntax of declarative exception handling
    19. Programmatic Exception Handling
    20. Logging from Struts
    21. Using Commons Logging and Log4J in Struts
    22. Writing Commons Logging Code
  • Miscellaneous Advanced Features
    1. Integration of Jakarta Common Libraries - BeanUtils
    2. Integration of Jakarta Common Libraries - Digester
    3. Multiple Sub-application Support
    4. DynaActionForms
    5. Validators
    6. Adding the Validator framework to a Struts application
    7. A tale of three files
    8. A sample rule in the file validator-rules.xml
    9. validation.xml file
    10. Validator Dependency
    11. Rule Variables
    12. Error Message
    13. Basic Validation Rules
    14. Client Side Validation
    15. Validating multiplication example using DynaActionForm
    16. Writing Custom Validators
    17. Validator Class Example
    18. HTTP Redirection
    19. Working With Check Boxes
    20. Context Sensitive Form Validation
  • Database Programming
    1. Basic Concepts
    2. MVC Interaction
    3. Database Connection
    4. Transaction Management
    5. Data Source
    6. Defining a Struts Data Source
    7. Opening a Connection from a Struts Data Source
    8. Creating an Editor Form
    9. Example Form Display Action
  • Templates and Tiles
    1. Struts Templates
    2. Defining the Template
    3. A template
    4. Using the template in a JSP
    5. <template:insert>
    6. <template:put>
    7. A JSP that uses the template
    8. Struts Templates
    9. Templates as UI components
    10. Struts 1.2 Tiles Support
    11. Tiles
    12. A JSP that uses the layout
    13. Tiles go beyond templates
    14. Inheritance in tiles definitions
    15. Definitions as Struts “forwards”
    16. Template or Tiles?
  • Unit Testing Struts Applications
    1. What is JUnit?
    2. Why JUnit?
    3. A JUnit Test
    4. Running the tests
    5. JUnit Basics
    6. Unit Testing Struts Applications
    7. A simple Struts test case
    8. MockStrutsTestCase Methods
    9. Downloading STC
    10. Testing Strategies
  • JSP Expression Language and Standard Tag Library
    1. JSP Expression Language (EL)
    2. Basic Usage
    3. Built-in Objects
    4. Working With Arrays and Maps
    5. Operators
    6. Full Example
    7. JSP Standard Tag Library (JSTL)
    8. Run Time Version
    9. Basic Tags
    10. Condition Tags
    11. Iterator Tags
    12. Internationalization (I18N)
    13. Setting Preferred Locale
    14. Specifying Resource Bundle
    15. Display Translated Text
    16. Display Number
    17. Display Date
    18. JDBC Tags
    19. Specify Data Source
    20. Performing a Query
    21. Display Result
    22. Pagination Example