WA1321 Servlets & JSP Development with Rational Application Developer v6 Training and Courseware Course Outline

1. Introduction to Rational Application Developer 6

  • Eclipse Platform
  • The WebSphere Studio Product Family
  • Rational Web Developer
  • Rational Application Developer
  • Key Features in RAD v6.0
  • WebSphere Studio Application Developer Integration Edition
  • WebSphere Studio Enterprise Developer
  • Views, Perspective and Editor Areas
  • Basic Operations with RAD Views and Perspectives
  • The Java Perspective
  • The Debug Perspective
  • Navigator View
  • Package Explorer
  • Outline View
  • Task and Problems View
  • Build and Validation
  • Import and Export Project
  • Project Interchange Feature
  • Code Completion, Templates and Snippets
  • Searching
  • Setup Compiler Class Path
  • JRE Switching
  • Refactoring
  • Changing Class Name
  • Changing Method Name
  • Changing Variable Name
  • Generalizing a Variable
  • Moving a Class to a Different Package
  • Extracting Code to a Method
  • Pull-up and Push-down Methods
  • Migrating Workspace from WSAD v5.x
  • Migrating J2EE Applications
  • J2EE Migration Wizard
  • Summary
 

2. J2EE Overview

  • Introduction
  • Why Do We Need J2EE?
  • J2EE Components
  • J2EE Technologies
  • Useful J2SE Technologies
  • Application Artifacts
  • J2EE Architecture
  • J2EE 1.4 Version Levels
  • J2EE Software Packaging
  • Deployment Descriptor
  • Enterprise Archive (EAR)
  • Web Modules and WAR
  • EJB Modules
  • Building Module Dependency
  • Objectives
  • Project Explorer
  • Servers View
  • The J2EE Perspective
  • The Web Perspective
  • RAD Project Structure
  • 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
  • Automatic Code Reloading
 

3. Servlet Basics

  • Objectives
  • History CGI
  • Server Extension APIs
  • Java Servlet
  • Servlet Container
  • Servlet Responsibilities
  • J2EE and Servlet
  • The Servlet Class
  • The HttpServlet Class
  • An Example Hello World
  • The Servlet Container
  • The Servlet API
  • Life Cycle Initialization
  • Life Cycle Initialization
  • Example Initialization
  • Life Cycle Processing
  • Life Cycle Processing
  • Life Cycle Destroy
  • User Input
  • Example User Input
  • Output to Client
  • Servlet Error Handling
  • Threading Issues
  • Create a Servlet in RAD
  • Code Servlet Methods
  • The Web Deployment Descriptor
  • Test the Servlet
  • Debug Servlets in the WebSphere Test Environment
 

4. Servlet Interaction Interface

  • Objectives
  • 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
  • Using HttpSession
  • Session Invalidation
  • An Example of Session Tracking Code...
  • An Example of Session Tracking Code
  • An Example of Session Tracking Code
  • An Example of Session Tracking Code
  • An Example of Session Tracking Code
  • An Example of Session Tracking Code
  • An Example of Session Tracking Code
  • HttpSession - URL Rewriting
  • Summary
 

5. JavaServer Page (JSP) Basics

  • Objectives
  • JavaServer Pages
  • A Simple Example - Hello.jsp
  • JSP Benefits
  • Evolution of Dynamic Content Technologies
  • How JSP Works
  • JSP Invocation
  • JSP Scripting Elements
  • The XML Syntax
  • JSP Directive
  • page Directive Attributes
  • page Directive an Example
  • page Attribute errorPage
  • page Attribute isErrorPage
  • Using XML Syntax
  • Directives include
  • Include an Example
  • 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 Scriptlets an Example
  • JSP Comments
  • JSP Predefined Variables
  • The request Object
  • The response Object
  • The out Object
  • Out an Example
  • Creating a JSP with RAD
  • Editing a JSP with RAD
  • Testing a JSP with WSAD
  • Debugging a JSP with RAD
 

6. Using Java Beans with JSP

  • Objectives
  • What is a JavaBean?
  • Structure of a JavaBean
  • Life Cycle
  • Properties
  • Very Simple Bean
  • Using Java Beans in JSP
  • The <jsp:useBean> tag
  • Java Bean scope
  • <jsp:useBean> in Action
  • The <jsp:getProperty> tag
  • The <jsp:setProperty> tag
  • Mapping all the request parameters
  • Another Example
  • Mixing Scriptlets and Bean tags
 

7. Servlet Programming Advanced

  • Objectives
  • Key Issues for Web Application Development Productivity
  • Web Application Programming Model MVC
  • Model
  • View
  • Controller
  • What is JDBC?
  • JDBC Architecture
  • JDBC: Basic Steps
  • Loading a Driver
  • DB2 UDB JDBC Drivers
  • Oracle JDBC Drivers
  • Create a Connection
  • Connection
  • Statement
  • PreparedStatement
  • ResultSet
  • 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
  • Connection Pool Example
  • Resource References
  • JavaBeans
  • MVC Implementation
  • 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
  • Display JavaBean Properties in JSP
  • Creating a Data Source with RAD
  • Adding Resource Reference in RAD
  • Create a Java Bean with RAD
  • Add Attributes and Getters and Setters with RAD
 

8. Servlet Filters

  • Objectives
  • What is a filter?
  • Why use a filter?
  • Uses for Filtering
  • Features of filters
  • The Filter interface
  • How a filter works
  • In what order?
  • A simple logging filter
  • Configuring the filter
  • Mapping the filter
  • The Web Deployment Descriptor
  • Common filter tasks
  • Request and Response Wrappers
 

9. Servlet Event Listener

  • What are Listeners
  • Types of Listeners
  • Writing a Servlet Context Listener
  • Writing a Servlet Context Attribute Listener
  • Writing a Session Activation Listener
  • Writing a Session Attribute Listener
  • Registering Listeners
  • Lifecycle of Listeners
 

10. Custom Tag Libraries

  • Introduction
  • Tag Attributes
  • Tag Body
  • Tag Library Descriptor
  • Tag Library Descriptor Details
  • carPrice.tld
  • The Java Server Page
  • Writing a Simple Tag Handler Class
  • Tag Handler Life Cycle
  • Rendering Content
  • Implementing Empty Body Tag
  • Example: CarPriceHandler
  • CarPriceHandler
  • carPrice.jsp
  • Implementing a Tag With Unprocessed Body
  • Handling Tag Bodies
  • Implementing Body Processing
  • Example: Body Tag Support
  • Implementing an Iteration Tag
  • Nested Tags
  • Summary
 

11. J2EE Security

  • Security Functionality
  • What Can You Secure in J2EE?
  • Challenge Mechanism
  • Basic Challenge
  • Client Certificates
  • Form-based Authentication
  • User Registry
  • J2EE Authorization Model
  • Protecting Web Resources
  • Protecting EJB Methods
  • EJB Delegation Policies
  • Delegation Scenario
  • Defining Roles at Application Level
 

12. J2EE Application Deployment

  • Overview
  • Application Deployment Descriptor
  • Deployment Descriptors
  • Bean Developer Entries
  • Application Assembler Entries
  • Separate Client Side Code (Optional)
  • Generate Deployed Code
  • Export EAR
  • Export EJB JAR
  • EJB JAR File
  • Export Client JAR
  • J2EE Deployment
  • Administrative Console
  • Environment Variables
  • Security
  • Resources
  • Queue Connection Factory
  • Queue Destinations
  • Installing Applications
  • Server Options
  • Starting an Application
  • Summary
 

13. Struts Architecture and Overview

  • Objectives
  • 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 <data-sources> element in the struts-config.xml
  • The <form-beans> element in the struts-config.xml
  • The <global-forwards> element in the struts-config.xml
  • The <action-mappings> 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
  • Summary
 

14. JSP Expression Language and Standard Tag Library

  • JSP Expression Language (EL)
  • Basic Usage
  • Built-in Objects
  • Working With Arrays and Maps
  • Operators
  • Full Example
  • JSP Standard Tag Library (JSTL)
  • Run Time Version
  • Basic Tags
  • Condition Tags
  • Interator Tags
  • Internationalization (I18N)
  • Setting Preferred Locale
  • Specifying Resource Bundle
  • Display Translated Text
  • Display Number
  • Display Date
  • JDBC Tags
  • Specify Data Source
  • Performing a Query
  • Display Result
  • Pagination Example
 

15. Enterprise JavaBean (EJB) Overview

  • Objectives
  • Needs for EJB
  • Distributed Computing
  • Distributed Transaction
  • Distributed Security
  • What are EJBs?
  • Main Characteristics of EJBs
  • EJB Remote Method Call
  • EJB Architecture Components
  • EJB Client
  • EJB JAR File
  • EJB Server
  • EJB Container
  • EJB Container - Persistence
  • EJB Container - Transaction
  • Enterprise Java Beans
  • 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
  • EJB Local Interface
  • Remote EJB Objects
  • Local EJB Objects
  • EJB Implementation Class
  • EJB Container - Relationships
  • EJB Container Relationships
  • Remote v. Local EJBs
  • EJB Application Development
  • Deploying Enterprise Beans
  • Major Components of Deployed EJBs
  • Summary