WA1356 Building J2EE Applications using Struts 1.1 and WSAD 5.1.1 Training and Courseware Course Outline

1. Introduction to WebSphere Studio Application Developer V5.1.1
  • The WebSphere Studio Family
  • Eclipse Platform
  • The WebSphere Studio Product Family
  • WebSphere Studio Site Developer Advanced
  • WebSphere Studio Application Developer
  • Key Features in WSAD v5.1.1
  • Key Features in WSAD v5.1
  • Eclipse 2.1 Features
  • JDK 1.4 and WebSphere v5.1
  • Migrating Specific Projects to Use JDK 1.4
  • Globally Migrating to JDK 1.4
  • JDK 1.4 – New Features
  • Control Flow of Logging
  • Loggers
  • Logging Example
  • Logging API - Handlers
  • Logging API – Formatters & Log Manager
  • Example Logging Configuration File
  • JDK 1.4
  • JDK 1.4 - Assertions
  • When to use Assertions
  • Enabling Assertions
  • UML Class Diagrams
  • UML Class Diagram – Adding new elements
  • WebSphere Studio Application Developer Integration Edition
  • WebSphere Studio Enterprise Developer
  • Views, Perspective and Editor Areas
  • Basic Operations with WSAD Views and Perspectives
  • The Java Perspective
  • Navigator View
  • Package Explorer Outline View
  • Task View
  • Build and Validation
  • Import and Export Project
  • Templates and Code Completion Searching
  • Setup Compiler Class Path
2. Introduction to J2EE and WebSphere 5.1
  • Java Web Applications
  • Java Web Application Architecture
  • J2EE Architecture
  • Web Application Programming Model – MVC
  • An MVC Example
  • The Infrastructure for Enterprise Web Applications
  • The IBM WebSphere Platform
  • WebSphere Studio Site Developer
  • WebSphere Studio Application Developer (WSAD)
  • Background of WSAD
  • Major Differences with VAJ –Class Source
  • Major Differences with VAJ –Class Bytecode
  • Major Differences with VAJ – EJB
  • IBM HTTP Server
  • Web Server Plug-in
  • WebSphere Application Server
  • What’s new in WebSphere Application Server v5.0
  • WebSphere Editions
  • WebSphere Edge Server v1.0
  • WebSphere Commerce Suite 5.4
  • WebSphere Site Analyzer
  • Services provided by WebSphere Application Server
  • WebSphere Application Server Architecture
  • WebSphere Administrative Topology
  • WebSphere Application Server Components
  • WebSphere Application Server Administrative Activities
  • WAS Administration tools
  • WSAD J2EE Development
  • WebSphere Test Environment in WSAD
  • WebSphere Test Environment – steps for test
  • Set Project Properties
  • Setup Server Properties
  • EJB Test Client in WSAD
3. J2EE Programming Tools
  • J2EE Hierarchy View
  • Servers View
  • The J2EE Perspective
  • The Web Perspective
  • Java Perspective
  • Server Perspective
  • Create an Enterprise Application
  • Setup Utility JAR
  • Create an EJB Project
  • Create a Web Project
  • Setup Dependent JAR Files
  • Create Server Instance and Server Configuration
  • Configure Server Instance
  • Add an Enterprise Application Project to the Test Server
  • Start and Stop the Server
  • Test a Servlet
  • Debug a servlet
  • Test a JSP
  • Debug a JSP
  • Log Analyzer
  • Symptom Database Profiling and Logging
4. Servlet Basics
  • History – CGI
  • Server Extension APIs
  • Java Servlet
  • Servlet Container
  • Servlet Responsibilities
  • J2EE and Servlet
  • The Servlet Class
  • An Example – Hello World
  • The Servlet Container
  • The Servlet API
  • Life Cycle – Initialization
  • Example Initialization
  • Life Cycle – Processing
  • Life Cycle – Destroy
  • User Input
  • Example – User Input
  • Output to Client
  • Servlet Error Handling
  • Threading Issues
  • Create a Web Project in WSAD
  • Create a Web Project
  • Create a Servlet
  • Code Servlet Methods
  • The Web Deployment Descriptor Test the Servlet
  • Debug Servlets in the WebSphere Test Environment
5. Servlet Interaction Interface
  • Request
  • Request Parameters
  • Request Attributes
  • Request Headers
  • Request Path
  • Other Request Information
  • Response
  • Cookies
  • Setting Cookies
  • Servlet Context
  • Servlet Context Attributes
  • Resource
  • Session Tracking
  • Tracking Techniques
  • Cookies
  • Cookies – an Example
  • HTML Hidden Fields
  • URL Rewriting
  • Using HttpSession
  • Session Invalidation
  • An Example of Session Tracking Code
  • Session Details
  • URL Rewriting
6. JavaServer Page Basics
  • JavaServer Pages
  • A Simple Example - Hello.jsp
  • JSP Benefits
  • Evolution of Dynamic Content Technologies
  • How JSP Works
  • JSP Invocation
  • Creating a JSP with WSAD
  • Editing a JSP with WSAD
  • Testing a JSP with WSAD
  • Debugging a JSP with WSAD
  • JSP Scripting Elements
  • JSP Directive
  • page Directive Attributes
  • page Directive – an Example
  • page Attribute – errorPage
  • page Attribute – isErrorPage
  • Directives – include
  • Include – an Example
  • Include at compile time vs. at request time
  • Request time inclusion
  • JSP Declarations Declarations – an Example
  • JSP Expressions
  • JSP Expressions – an Example
  • JSP Scriptlets
  • JSP Scriptlets – an Example
  • JSP Comments
  • JSP Predefined Variables
  • The request Object
  • The out Object
  • Out – an Example
7. Using JavaBeans with JSP
  • What is a JavaBean?
  • Structure of a JavaBean
  • Life Cycle
  • Properties
  • Very Simple Bean
  • Using Java Beans in JSP
  • The tag
  • Java Bean scope in Action
  • The tag
  • The tag
  • Mapping all the request parameters
  • Another Example
  • Mixing Scriptlets and Bean tags
8. JSP Programming Techniques
  • Error Handling
  • Example Exception Handling
  • Using an Error Page
  • Form Validation – Client Side
  • Form Validation – Server Side
  • Session Tracking
9. Servlet Programming – Advanced
  • Key Issues for Web Application Development Productivity
  • Web Application Programming Model – MVC
  • What is JDBC?
  • JDBC Architecture
  • JDBC: Basic Steps
  • Loading a Driver
  • DB2 UDB JDBC Drivers
  • Create a Connection
  • Connection
  • Statement
  • PreparedStatement
  • ResultSet
  • ResultSet
  • Example JDBC Servlet With Transactions
  • Close the Connection
  • Need for Connection Pooling
  • Connection Pooling in JDBC 2.0
  • Connection Pooling
  • Basic Steps in Using JDBC Connection Pooling
  • Access a DataSource
  • Get a Connection
  • Release Connections
  • Monitoring Database Connection Pool Activity
  • Connection Pool Example
  • Creating a Data Source with WSAD
  • Java Beans
  • Create a Java Bean with WSAD
  • Add Attributes and Getters and Setters with WSAD
  • Web Applications
  • Request Dispatching
  • Request Dispatching - Forward vs. Include
  • HTTP Redirection
  • Dispatch vs. redirection
  • Integrating Servlet and JSP
  • Calling a JSP from a Servlet
  • Request Dispatching - forward Request to JSP
  • Supply Result information to the JSP
  • A Simple Example
10. EJB Overview
  • Needs for EJB
  • Distributed Computing
  • Distributed Transaction
  • Distributed Security
  • What are EJBs?
  • Main Characteristics of EJBs
  • EJB Technologies
  • CORBA Object Distribution
  • RMI over IIOP
  • EJB Architecture Components
  • EJB Client
  • EJB JAR File
  • EJB Server
  • EJB Container
  • EJB Container - Persistence
  • EJB Container - Transaction
  • Enterprise Java Beans
  • Message-Driven Beans are Different
  • Session Beans
  • Entity Beans
  • EJB Classes and Interfaces
  • Basic Components of Entity and Session Beans
  • EJB Home Interface
  • An EJB Home Interface Example
  • EJBHome Object
  • EJB Remote Interface
  • Remote Interface Example
  • EJB Local Home Interface
  • Remote EJB Objects
  • Local EJB Objects
  • EJB Implementation Class
  • EJB Container - Relationships
  • How do (remote) EJBs Work
  • Remote v. Local EJBs
  • EJB Application Development
  • Deploying Enterprise Beans
  • Major Components of Deployed EJBs
  • WebSphere EJB Server Architectural Overview
11. Struts Architecture and Overview
  • Review: MVC Model
  • Review: Request, Session and Application
  • What is Struts?
  • Struts Flow
  • Components in Struts
  • The Model
  • The View
  • The Controller
  • Struts Flow
  • struts-config.xml
  • struts-config.xml Content
  • The element in the struts-config.xml
  • The element in the struts-config.xml
  • The element in the struts-config.xml
  • The element in the struts-config.xml
  • Sample struts-config.xml
  • The Role of web.xml for the Application
  • Configuring Struts in the web.xml
  • web.xml Content
  • Steps to Configuring Struts in the web.xml
  • Step 1. Configuring the Action Servlet Instance in the web.xml
  • Action Servlet Config Example
  • Step 2. Configuring the Action Servlet Mapping in web.xml
  • Prefix Mapping Example
  • Extension Mapping Example
  • Step 3. Configuring the Struts Tag Libraries in the web.xml
  • Sample web.xml
12. The First Struts Application
  • The application
  • The Structure
  • Setup Needed
  • Directory Structure
  • index.jsp
  • The index.jsp Page
  • struts-config.xml
  • MultiplyForm.java
  • MultiplyAction.java
  • result.jsp
  • The result page
  • ApplicationResources.properties
13. Development of Struts Applications Using WSAD v5.1
  • Directory Structure of a Struts Application
  • Directory Structure of a Struts Application – an Example
  • WSAD Struts Support
  • Create a Struts Web Application project
  • View the Struts Project Structure
  • Create a Struts JSP
  • Insert Struts Tags
  • Creating a Struts Form Bean
  • Create a Struts Action
  • Edit a Struts Configuration File
14. Struts Development Cycle
  • Struts Development Cycle
  • Gathering Requirements
  • Defining Screen Requirements
  • Detailed screen design
  • Struts view components – Data vs. ActionForm Bean
  • Defining Screen Requirements – define FormBean
  • Developing the FormBean
  • Developing the FormBean – The reset( ) Method
  • Developing the FormBean – The validate( ) Method
  • Developing the FormBean – ActionErrors
  • Developing the FormBean – Defining the Message Key
  • Determining the Screen Flow
  • Defining the ActionMappings in the struts-config.xml
  • Developing the Action Class – action and Action Class
  • Developing the Action Class
  • Developing Actions – The execute() Method
  • Developing Actions – ActionForward
  • Developing Actions – ActionMapping class
  • Developing Actions – execute() example
  • execute() Method Example
  • Developing Business Logic – EJBs
  • Developing JSPs
  • Configuring struts-config.xml and web.xml
  • Build, Pack, and Deploy
15. Custom JSP Tag Libraries
  • JSP taglib Directive
  • Components of a Tag library
  • The JSP File
  • The Tag Library Descriptor
  • The Tag Handler Class
  • An Example
  • The TLD File – carPrice.tld
  • TLD File – Example
  • The Handler Class – CarPriceHandler.java The Handler Class – Example
  • The JSP File – Carprice.jsp
  • Tag Lib Handler Lifecycle
  • Directory Structure: where Custom Tag Libraries Fit
  • Struts TagLib
  • Bean Tags
  • bean:define
  • bean:message
  • bean:page
  • bean:include
  • bean:cookie
  • HTML Tags
  • html:form
  • html:submit
  • html:text
  • html:link
  • html:password
  • Logic Tags
  • Logic Tags functionality
  • logic:equal
  • logic:iterate
  • Template Tags
  • Example of Template Tags
16. Struts Extensions, Internationalization and Error Handling
  • Struts Extensions
  • Example of Template Tags
  • Extension Points
  • Plug-ins
  • A plug-in example
  • Custom Configuration Class
  • Writing a Configuration Class
  • Custom Struts Servlet
  • Custom Request Processor
  • Base Action Class
  • Base Form Beans
  • Custom JSP Tags
  • Internationalization (I18N)
  • Error Handling
  • The ActionError class
  • The ActionErrors class
  • Error Handling : validate() method of ActionForm
  • Displaying the errors found in the validate method
  • Error Handling : execute() method of Action
  • Declarative Exception Handling
  • Syntax of declarative exception handling
  • Programmatic Exception Handling
  • Logging from Struts
  • Using Commons Logging and Log4J in Struts
  • Writing Commons Logging Code
17. Miscellaneous Advanced Features
  • Advanced Features Discussed in This Chapter
  • Integration of Jakarta Common Libraries - BeanUtils
  • Integration of Jakarta Common Libraries - Digester
  • Multiple Application Support
  • DynaActionForms
  • Validators
  • Adding the Validator framework to a Struts application
  • A tale of three files
  • A sample rule in the file validator-rules.xml
  • validator.xml file
  • Validator Dependency
  • Rule Variables
  • Error Message
  • Basic Validation Rules
  • Client Side Validation
  • Validating multiplication example using DynaActionForm
  • Writing Custom Validators
  • Validator Class Example
  • HTTP Redirection
  • Context Sensitive Form Validation
18. Database Programming
  • Basic Concepts
  • MVC Interaction
  • Database Connection
  • Transaction Management
  • Data Source
  • Defining a Struts Data Source
  • Opening a Connection from a Struts Data Source
  • Creating an Editor Form
  • Example Form Display Action
19. Templates and Tiles
  • Struts Templates
  • Defining the Template
  • A template
  • Using the template in a JSP
  • A JSP that uses the template
  • Struts Templates
  • Templates as UI components
  • Struts 1.1 Tiles Support
  • Tiles
  • Tiles example
  • A JSP that uses the layout
  • Tiles go beyond templates
  • Inheritance in tiles definitions
  • Definitions as Struts “forwards”
  • Template or Tiles?