DOC

WA1053 Introduction to Struts

By Robin Reyes,2014-04-14 02:32
12 views 0
Develop a high level design. Present the high level design to the instructors and class. Modify the high level designs based on comments; create detailed

WA1300 Struts 1.1 Boot Camp Using WSAD

    This course introduces the students to Jakarta Struts 1.1. 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. Towards the end of the course, the students get to apply their Struts knowledge to build a

    mini e-commerce application.

Objectives

    ? Understand and explain the Jakarta Struts framework

    ? Design and build Struts based applications

Topics

    ? Struts Architecture and Overview

    ? A Simple Struts Application

    ? Struts Development Cycle

    ? Struts Tag Libraries

    ? Struts Extensions, Internationalization, Error Handling and Logging

    ? Miscellaneous Advanced Features such as Validators and DynaActionForm

    ? Database Programming

    ? Templates and Tiles

    ? Unit Testing Struts Applications StrutsTestCase

    ? JSTL

     Project

     An e-commerce application that allows a customer to proceed from home page to checkout. The application will resemble the retail e-commerce applications such as the amazon.com bookstore.

     Audience

    This course is intended for programmers and designers who want to design and develop applications using the Jakarta Struts Model-View-Controller (MVC) framework.

Prerequisites

    ? A good understanding of HTML.

    ? A good understanding of object-oriented programming using Java. ? Experience with JSPs and Servlets with some understanding of JavaBeans or EJBs.

Duration

     Five days.

    WA1300 Struts 1.1 Boot Camp Using WSAD

     Course Outline

    1. Struts Architecture and Overview

    ? Introduction to Struts

    ? Objectives

    ? Review: MVC model

    ? What is Struts?

    ? Struts flow

    ? Components in Struts?

    o The Model

    o The View

    o The Controller

    ? struts-config.xml

    o The <data-sources> element o The <form-beans> element

    o The <global-forwards> element

    o The <action-mappings> element

    o Sample

    ? The role of web.xml for the application ? Configuring Struts in web.xml

    o web.xml content

    o Steps to configuring Struts in web.xml

    o Sample

    ? Summary

    2. A Simple Struts Application

    ? The Goal of the Application

    ? The input form? The struts-config.xml ? The Form Bean class ? The Action class

    ? The result page

    3 Developing Struts Applications in the Tomcat Environment

    ? Objectives

    ? Software’s to be istalled

    ? Creating the directory structure

    ? The build.xml file for build using ANT

    ? Deploying a Struts application in Tomcat ? Debugging a Struts application in Tomcat

    4. Struts Development Cycle

    ? Objectives

    ? Struts development cycle

    ? Gathering requirements ? Defining screen requirements

    o Data vs. FormBean

    o define FormBean

    ? Determining the screen flow ? Defining the ActionMappings in struts-config.xml

    ? Developing the FormBean

    o The reset ( ) method

    o Form validation using the validate ( ) method

    o ActionError

    o Define message key ? Developing Action Class

    o Action and Action Class

    o The execute() method

    o ActionForward

    o ActionMapping class

    o execute() example

    o Example execute() method

    o Developing business logic - EJB ? Developing JSPs

    ? Configuring struts-config.xml and web.xml ? Build, pack and deploy

    5. Struts Tag Libraries

    ? Objectives

    ? JSP taglib directive

    ? Components of a tag library ? The JSP File

    ? The tag library descriptor

    ? The tag Handler Class

    ? An example

    o The TLD File - carPrice.tld

    o TDL File - example

    o The Handler Class - CarPriceHandler.java

    o The Handler Class - example

    o The JSP File - Carprice.jsp ? Tag Lib Handler life cycle

    ? Directory structure: where custom tag libraries fit

    ? Struts TagLib

    ? Bean tags o bean:message

    o bean:define

    o bean:page

    o bean:include

    o bean:cookie

    ? HTML tags

    o html:form

    o html:submit

    o html:text

    o html:link

    o html:password

    ? Logic tags

    o Functionality

    o logic:equal

    o logic:iterate

    ? Template tags

    6. Struts Extensions, Internationalization, Error Handling and Logging

    ? Objectives

    ? Struts extensions

    ? Extension points

    o Struts plugins

    ? Creating a plugin

    ? Configuring a plugin

    o Custom configuration class

    o Custom Struts Servlet

    o A custom RequestProcessor

    o A base Action class

    o A base FormBean class

    o Custom JSP tags

    ? Internationalization

    o Struts Internationalization Mechanisms o Adding internationalization to the example application

    o Formatting messages

    ? Error Handling

    o Struts Error Handling Mechanisms

    o ActionError and ActionErrors

    o Error handling from a form bean

    o Error handling from an action

    o Formatting error messages

    o Struts exception handling

    o Adding error handling to the example application

    ? Logging from Struts

    o The mechanism

    o Using Log4J

    7. Miscellaneous Advanced Features

    ? Objectives

    ? HTTP Redirection

    ? Dealing with check boxes

    ? Context sensitive form validation ? DispatchAction

    ? BeanUtils package ? Digester package

    ? DynaActionForms

    ? Multi-application support

    ? Validators

    ? Writing custom validators

    8. Database Programming

    ? Configuring and using a Struts Data Source ? Using a J2EE Data Source

    ? Transaction management from an action ? Sharing a connection with the model classes

    ? Pre-populating a form for editing data ? Paginated listing of large amounts of data

    9. Templates and Tiles

    ? Objectives

    ? Struts Templates

    ? Using the template in a JSP

    ? Struts 1.1 tiles support

    ? Inheritance in tiles definitions

    ? Templates or Tiles?

    10. Unit Testing Struts Applications - StrutsTestCase ? Objectives

    ? What is JUnit?

    ? A sample JUnit test case

    ? A simple StrutsTest test case

    ? Executing a StrutsTest test

    ? Testing strategies

    11. JSTL

    ? Objectives

    ? The future of Struts Tags

    ? JSTL - What does it provide?

    ? JSTL actions

    o Core JSTL tags

    o Formatting tags o Database tags

    o XML tags

    ? JSTL Expression Language

    ? JSTL Implicit Objects

     12. Struts Project Workshop

    ? Understand a draft set of business and user requirements ? Interact with the project sponsor (for project goals) and business user (for business process info).

    ? Develop a high level design.

    ? Present the high level design to the instructors and class. ? Modify the high level designs based on comments; create detailed design and test cases.

    ? Update the detailed design if needed, code your solution. ? Prepare and execute test cases.

    ? Demonstrate the solutions and test results to the instructors and class.

Report this document

For any questions or suggestions please email
cust-service@docsford.com