J2EE Programming using RAD v7
Revision: TE1114_20080201
Course Length:
5 Days
Course Description:
This course is an introduction to writing J2EE (Java 2 Enterprise Edition) applications using IBM WebSphere Application Server 6.1 and Rational Application Developer 7. An overview of J2EE technology is provided, followed by hands-on experience writing and testing servlets, JavaServer Pages (JSP), custom JSP tags, and and Enterprise JavaBeans (EJB). Other topics include Java Naming and Directory Interface (JNDI), Java Database Connectivity (JDBC), cookies, and HTTP session management.
Who Should Attend:
This course is for experienced Java programmers and software engineers preparing to write J2EE applications to be deployed on WebSphere Application Server.
Benefits of Attendance:
Upon completion of this course, students will be able to:
- Describe the J2EE component model and its use in building server-side applications
- Develop and test Java servlets
- Use cookies and manage HTTP sessions in Web applications
- Develop and test JavaServer Pages (JSP)
- Use existing and create new custom JSP tags
- Use Java Naming and Directory Interface (JNDI) to locate and access network resources
- Develop and test stateless and stateful session beans
- Develop and test BMP and CMP entity beans
- Write custom finder methods using EJB Query Language (EJB QL)
- Understand and manipulate XML-based deployment descriptors
- Describe the benefits of local interfaces and the Session Facade pattern
- Deploy and test Web and EJB applications using WebSphere Application Server 6.1 and Rational Application Developer 7
- Use the IBM Universal Test Client
Prerequisites:
Students should be comfortable with Java programming and object-oriented concepts. A minimum of six months coding experience is suggested. In addition, prior experience using HTML, XML, and SQL is helpful.
Course Outline:
- Chapter 1: Overview of J2EE
- Java Platforms
- Characteristics of "Enterprise" Computing
- J2EE Technologies
- Multi-Tier Architectures
- Advantages of Multi-Tier Architectures
- Container-Based Approach
- Parties Involved in J2EE Deployment
- J2EE-Compliant Application Servers
- J2EE Application Models
- HTTP Services Application Model
- N-Tiered Application Model
- Chapter 2: Introduction to Rational Application Developer
- What is WebSphere®?
- What is Rational® Application Developer?
- Starting RAD
- Starting and Stopping WebSphere
- Creating an Enterprise Application Project
- Creating a Dynamic Web Project
- Chapter 3: Servlets
- A Simple Servlet
- Web Applications
- WebSphere Deployment Descriptors
- Running Servlets in RAD
- Configuring Servlets
- Configuring Servlets in RAD
- Servlet Initialization Parameters
- Generating and Validating Forms
- Servlets and Threads
- Other Settings in web.xml
- Chapter 4: Session Management
- Cookies
- Sessions
- Session Id's
- Session Management
- Session Management Example
- URL Rewriting
- Invalidating Sessions
- Configuring the Session Timeout
- Chapter 5: JavaServer Pages
- JavaServer Pages
- A Simple JSP
- Running JavaServer Pages in RAD
- JSP Syntax
- Configuring JavaServer Pages
- JSP Directives
- JSP Actions
- JSP Example with Forwarding
- JavaServer Pages and JavaBeans
- JSP with JavaBean Example
- Running the JSP Bean Example
- Creating a New JSP
- Chapter 6: Custom JSP Tags
- Using Custom Tags
- Types of Tags
- Defining Tags
- The tag Element
- Simple Tags
- Tags with Attributes
- Using JSP Expressions as Attributes
- Including the Tag Body
- Optionally Including the Body
- Including the Body Multiple Times
- Running the Examples
- Chapter 7: Java Naming and Directory Interface
- What is JNDI?
- Benefits of JNDI
- Naming Services
- Directory Services
- Using JNDI
- Context Operations
- JNDI Utility Class
- JNDI Example
- Running the JNDI Example
- Naming Exceptions
- Creating a New Standalone Program
- Chapter 8: Database Access Using JDBC
- A Simple JDBC Program
- JDBC Driver Types
- Using the Derby Database
- JDBC Data Sources
- Data Source Example
- Configuring a JDBC Provider
- Configuring a Data Source
- Running the JDBC Examples
- Using the Database Explorer
- Using JDBC in a Servlet
- Using JDBC in a JSP
- Chapter 9: Enterprise JavaBeans
- Enterprise JavaBeans Component Model
- Types of Enterprise Beans
- EJB Wrapper Interfaces
- Deployment Descriptors
- Context and Environment Objects
- EJB Runtime Environment
- The Remote Interface
- The Home Interface
- The Enterprise Bean Class
- The Client Test Program
- The ejb-jar.xml File
- The ibm-ejb-jar-bnd.xmi File
- Importing the EJB Projects
- Updating the Enterprise Application Project
- Testing with the IBM Universal Client
- Chapter 10: Session Beans
- Session Bean Lifetime
- Session Bean Interface
- Session Bean Lifecycles
- Stateless Session Bean Example
- Accessing Environment Entries
- Stateful Session Bean Example
- EJB Exceptions - Examples
- Testing the Session Beans
- Chapter 11: BMP Entity Beans
- Entity Beans
- Entity Bean Interface
- Lifecycle of an Entity Bean
- Bean-Managed Persistence Example
- Deploying Entity Beans
- Deployment Settings for BMP Entity Beans
- Chapter 12: CMP Entity Beans
- Container-Managed Persistence
- Primary Key Class
- Implementing CMP Entity Bean Methods
- Container-Managed Persistence Example
- Deployment Settings for CMP Entity Beans
- Deployment Settings for Custom Finders
- EJB Query Language
- Mapping Container-Managed Fields
- Testing the Product Bean
- Chapter 13: Session Facade Pattern
- J2EE Design Patterns
- Session Facade Pattern
- Local Interfaces
- Example - ItemOrderer Bean
- Deployment Settings for ItemOrderer Bean
- Testing the Session Bean
- Bottom-Up Mapping
- Configuring the Application Client Project
- Chapter 14: Using EJBs in a Web Application
- Using Web Components as EJB Clients
- Servlet Code for the Survey Application
- Session Bean for the Survey Application
- Deploying the Survey Application
- Testing the Survey Application
- Appendix A: Web Resources
- Java Technology
- WebSphere
- Derby Database
- Appendix B: HTML Reference
- Introduction
- A Simple HTML Document
- Basic Tags
- Formatting Tags
- Links
- Forms
- Appendix C: Web Accessibility
- What is Accessibility?
- What is Section 508?
- Accessibility Initiatives and Related Legislation
- Types of Disabilities
- Assistive Technologies
- Benefits of Accessible Design
- General Coding Practices
- Other Recommendations
- Appendix D: Best Practices for J2EE Applications
- General Practices
- Servlets
- Enterprise Beans
- EJB Home Locator and Caching Class
- Summary
- Appendix E: Java Message Service
- Introduction
- JMS and the J2EE Platform
- Basic JMS Concepts
- The JMS Programming Model
- Point-to-Point Example - Sender
- Point-to-Point Example – Receiver
- Configuring JMS for WebSphere
- Running the Point-to-Point Example
- Publish/Subscribe Example - Publisher
- Publish/Subscribe Example - Subscriber
- Running the Publish/Subscribe Example
- Reliable Message Delivery
- Appendix F: Message-Driven Beans
- Message-Driven Beans
- Message-Driven Bean Lifecycle
- Message-Driven Bean Example
- Configuring an Activation Specification
- Deploying Message-Driven Beans
- Creating a New Message-Driven Bean



