Java Enterprise Edition (Java EE 5) is a powerful platform for building web applications. The Java EE platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This course tells students what they need to know to design and build their own web applications. Participants will explore details of the key Java EE technologies and how to leverage the strengths of each with special focus on Servlets and JSP. At the same time, they’ll learn about the big picture of Java EE and how to design web applications that are robust, efficient and maintainable. If you want to deliver an application on the web, you’ll find this course essential.

The course begins with a discussion of web application architecture. A major part of the course is spent on Servlets and JavaServer Pages (JSP) with special focus on using the JSTL. It then covers JDBC, Java’s database access technology. The course concludes with an introduction to EJB and other important Java EE technologies. Throughout the course, students will create code for a online store. Students will learn not only specific topics and APIs but also how to fit the pieces together into a complete application.

Supported platforms include Eclipse/Tomcat, GlassFish, JBoss AS, IBM Rational Application Developer (RAD) / Websphere AS and Weblogic AS.

Course Duration: 5 days
Prerequisites:

Students should have an understanding of Java, Servlets, JSPs and EJBs.

Course Objectives:
  • Design and build robust and maintainable web applications
  • Create dynamic HTML content with Servlets and Java Server Pages, using the JSP Standard Tag Library (JSTL)
  • Make Servlets and JSP work together cleanly
  • Use JSTL and other Custom Tag Libraries to separate Java and HTML code
  • Access databases with JDBC
  • Use Enterprise JavaBeans effectively from Servlets and JSP
  • See the full descriptions for detailed content
Course Outline:
  • Java EE Introduction
    • Java EE Overview
    • Java EE Technologies
    • Java EE Architecture
    • MVC
  • Servlets and JSP with JSP Standard Tag Library (JSTL) Web Application Basics
    • How the Web Works, Thin Clients, TCP/IP
    • HTTP Overview, Brief HTML Review
    • Overview of J2EE
    • Web Application Structure and Contents
    • Servlet Basics and Capabilities
    • Basics of Writing a Servlet
    • Labs – Setup Development Environment and Server
      • Create a Simple Web Application
      • Create a Simple Servlet
  • Servlet API
    • HTML Forms Review
    • HTTP Review
      • Request-Response, Headers, GET, POST
    • How Servlets Work
      • Servlet Lifecycle: init (), service (), destroy ()
      • API – Servlet, ServletConfig, ServletRequest, ServletResponse, GenericServlet,
      • Requests and Responses – Using ServletRequest and ServletResponse
      • HTTP Servlets – HttpServlet, HttpServletRequest, HttpServletResponse
      • Accessing Parameters
      • More About web.xml
    • Labs – Using Client Input, Retrieving Parameters
  • Additional Servlet Capabilities
    • Working with HttpServletResponse
      • Status/Errors
      • Response Headers
      • MIME Types
    • Initialization
      • Overview
      • Using ServletConfig and ServletContext
      • Init Parameters – Servlet and Web App
    • Error Handling, Error Pages and Their Configuration
    • Labs – Using Model Classes, Generating Simple Output
  • JavaServer Pages
    • Basics and Overview
      • JSP Architecture
      • JSP Tags and JSP Expressions
      • Fixed Template Data
      • Lifecycle of a JSP
    • Model View Controller (MVC)
      • Overview
      • Java EE Model 2 Architecture: Servlet Controllers, JSP Views, JavaBeans Glue
    • Servlets as Controllers
      • Using RequestDispatcher
      • Forwarding and Including
    • Data Sharing in a Web App
      • Object Scopes or “Buckets”
      • Using JavaBeans to Hold Data
      • Using the Scope Objects – get/set/remove Attributes
      • Request, Application, Session and Page Scope
    • JSP Expression Language (EL) and Data Access
      • JSP EL Overview
      • JavaBeans and the EL
      • Predefined JSP EL Implicit Objects (pageContext, param, header, scope objects)
      • <jsp:useBean>, <jsp:getProperty>, <jsp:setProperty>
    • jsp:include, jsp:forward, the page Directive
    • Lab – Create a Simple JSP Page
      • Put Data on a Scope and Forward to a JSP
      • Use the JSP Expression Language
  • Using Custom Tags
    • Custom Tags Overview
    • Reducing JSP Complexity
    • Tag Libraries
      • Overview and TLD (Tag Library Descriptor)
      • Taglib Directive – Using a Tag Library
    • JSTL
      • Overview
      • c:out, c:forEach
      • c:url, c:param
    • Labs – Use c:forEach for Iteration
      • Working with Links and c:url
  • HTTP Session Tracking
    • HTTP Session Overview
      • HTTP as a Stateless Protocol
      • Hidden Form Fields
    • Cookies
      • Overview and Servlet API
      • Using Cookies, Persistent and Session Cookies
      • Issues
    • Sessions
      • Servlet/JSP Session Support, HttpSession
      • Using Sessions – Putting Data in, Retrieving Data From
      • How Sessions Work
    • Labs – Storing and Using Session Data
  • More JSP Capabilities
    • Error Pages
      • Error Pages and Exception Handling
      • The Implicit Exception Object
      • JSP 2.0+ Error Handling and errorData Object
      • Directives (page, include, others)
    • JSPs as XML Documents
    • Scriptlets – Overview and Usage
    • Labs:
      • Using Error Pages
      • {Optional} Using Scriptlets
  • More JSTL and EL
    • More About the JSTL
      • Core, Formatting, SQL, XML, Functions Libraries
      • Custom Tag Architecture and Tag Library Structure
      • c:if, c:choose, c:import
      • Formatting: formatNumber, formatDate, Resource Bundles
      • Using Common Tags
      • XML Action Example
    • More About the JSP EL
      • Syntax, Identifiers, Literals, Operators
      • Implicit Objects
      • The pageContext in Detail
      • Type Coercion
      • String Concatenation
    • Using Common Tags
      • c:if, c:choose
      • c:set
      • fmt:formatDate, fmt:formatNumber
    • Labs – Using c:if, c:choose, c:when and c:otherwise
      • [Optional]: Using the Function Library
      • JSTL Format Tags
  • Security
    • J2EE Security Overview
    • Role Based Security
    • Declarative Security
    • Web Authentication – Basic, Form-Based, Digest, HTTPS Client
    • Using Basic Authentication
    • Using Form-Based Authentication
    • Programmatic Security – HttpServletRequest, Retrieving Roles
    • Labs – Securing a Web App, Setting Up and Using a Security Domain
  • Additional Topics
    • Design Issues
      • Dividing Responsibilities Between Servlets/JSP
      • Network Overhead
      • Scalability – Clustering, Serving Static Content
      • Using the Technology Well
    • Custom Tags Using Tag Files
      • Overview and Writing Tag Files
      • Tag Attributes
      • The Tag Directive
    • Servlet Filter Overview
      • Filtering Examples, Lifecycle and Filter Chains
      • Filter API, Modifying a Request, Modifying a Response
    • Java ServerFaces (JSF) Overview
      • Advanced MVC – JSF Overview
      • JSF Components
      • Process Flow
      • Advantages and Disadvantages
  • JDBC
    • JDBC Introduction
    • Relational Database and JDBC Overview
      • Overview, Table Relationships, Web-Based Data Access, JDBC Characteristics
    • JDBC Architecture, JDBC API Overview
      • DriverManager, JDBC Drivers
      • Naming Databases with JDBC URLs
    • Connecting to a Database
      • Connection interface, Establishing a Connection
    • DataBaseMetaData
    • Handling Database Exceptions
  • Data Access with JDBC
    • Data Access Objects (DAO), O-R Mapping, Value Objects
    • Processing Database Data
      • Executing Statements, Precompiled Statements and Stored Procedures
      • Processing ResultSets
      • Dealing with Null Sata
      • Updating, Inserting, Retrieving Data
      • Controlling Transactions
    • JDBC Driver Types
    • Labs – Creating DAO using JBDC
  • Advanced Topics
    • Java Persistence API Overview
    • Advanced JDBC Features
      • Batch Updates, Srollable Result Sets, Rowsets, User Defined Types, BLOBS, CLOBS
  • Database Integration and Additional Technologies
    • Java EE Database Integration
    • Environment Naming Context (ENC) and Resource Injection
    • JNDI Overview and the ENC
    • Connecting Servlets to a Database via DataSource
    • Connection Pooling
  • Additional Topics
    • EJB
      • Overview of EJB
      • High-Level EJB Architecture
      • Roles within EJB
      • Client View of a Session Bean
      • JNDI (Java Naming and Directory Interface)
      • Remote and Home Interfaces
      • Writing an EJB Client
    • XML and Web Services Overview
      • XML and Web Services
      • JAX-WS Web Services Overview
    • Design Considerations: Web Design, System Architecture, Scalability, Clustering
    • Lab – Accessing a Database from a Servlet
      • Other Optional Labs (Depends on Platform Support)