Learning Patterns: Your Global Source for Java Training, Mentoring, and Consulting
Home | About LearningPatterns | Our Services | Contact Us | Printer Friendly Link

Course Description:

Fast Track to Java EE with Servlets, JSP & JDBC

Java Enterprise Edition (Java EE) 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 you what you need to know to design and build your own web applications. You'll learn the 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, you'll be learning 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.

Course Information

Duration: 5 days

Hands-on: 50% hands-on, 50% lecture

Supported Platforms: Eclipse/Tomcat, GlassFish, JBoss AS, IBM Websphere AS, Weblogic AS

Skills Gained:

Course Details:

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 Java EE, servlets & Web applications.
  • Servlet Basics
  • Labs:
    • Create a web application with an HTML form which will eventually be processed by a servlet
    • Create a simple servlet

Servlet API

  • HTML Forms,
  • HTTP: Request-response, headers, GET, POST
  • Overview: How Servlets Work
    • Servlet Lifecycle: init(), service(), destroy()
    • Requests and responses
  • Core Servlet API: GenericServlet, ServletRequest, and ServletResponse
  • HTTP Servlets: HttpServletRequest , HttpServletResponse and HttpServlet
  • Accessing Parameters
  • Labs:
    • Create and invoke a simple product search servlet and configure the web app to use it.
    • Retrieve parameters

Additional Servlet Capabilities

  • HTTP headers and MIME types
  • RequestDispatcher: Including and forwarding
  • Sharing data with the request object attributes
  • Sharing data with ServletContext attributes
  • Error Handling
  • Labs:
    • Add search functionality with a utility class
    • Validate data and redirect back to the requesting form using RequestDispatcher

JavaServer Pages

  • Basics and Overview
    • JSP architecture
    • JSP tags and JSP expressions
    • Fixed Template Data
    • Lifecycle of a JSP
  • Model View Controller (MVC)
    • Model 1/Model 2 Architecture
  • Data Sharing among servlets & JSP
    • Object scopes or “buckets”
    • Request, application, session and page scope
    • Predefined JSP implicit objects (request, session, application, page)
    • <jsp:useBean>
    • <jsp:getProperty>, <jsp:setProperty>
    • <jsp:include>, <jsp:forward>
  • Labs:
    • Create a simple JSP page, and forwarding to it
    • Use JavaBeans in a JSP page
    • Include a JSP using jsp:include

Using Custom Tags

  • Custom tags overview
  • Reducing JSP complexity
  • Tag Libraries
    • Tag Library Descriptor (TLD)
    • Loading a tag library in a web app
  • The JSTL
  • JSP Expression Language (EL)
  • Using custom tags
    • The c:url, c:param, c:forEach, c:out tags
  • Labs:
    • Use custom tags in JSP
    • Use JSTL custom tags to iterate

More JSP Capabilities and Session Management

  • HTTP as a stateless protocol
  • Hidden form fields
  • Cookies: Overview , API, Using cookies
  • Session overview: Cookies and session tracking
  • HttpSession
    • Putting data into a session object
    • Retrieving data from a session object
  • Using session data in servlets and JSPs
  • Additional JSP Capabilities
    • Exception handling and error pages
    • Directives (page, include, others)
  • Import declarations
  • Multithreading considerations and data safety
    • SingleThreadModel interface
  • Labs:
    • Create a shopping cart & store it in a session
    • Put items in cart with servlet, display with JSP
    • URL Rewriting

Additional JSP Capabilities

  • JSP Directives
  • JSP Error Pages
  • JSP and Java
    • Declarations, Scriptlet overview, Scriptlet syntax
  • Labs:
    • Create an error page
    • (Optional) Create JSP pages using scriptlets

More JSTL

  • Overview of JSTL libraries
  • The JSTL Expression Language
    • Expressions, Type Coercion, Operators, String concatenation, Implicit Objects
  • The Core JSTL Library
    • General Purpose: c:out, c:set, c:catch
    • Conditional: c:if, c:choose,
  • Overview of other capabilities
  • Labs:
    • Using c:if, c:choose, c:when and c:otherwise to customize output

Additional Topics

  • Servlet Filter overview
    • Filtering examples, lifecycle, & filter chains
    • Filter API, Modifying a request, Modifying a response
  • Struts Overview
    • Advanced MVC – Struts overview
    • Command and State patterns
    • Struts View and Controller elements

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

  • DAO – Data Access Objects, O-R Mapping, Value Objects
  • Processing Database Data
    • Executing statements, precompiled statements and stored procedures
    • Processing ResultSets,
    • Dealing with Null data
    • Updating, inserting, retrieving data
    • Controlling Transactions
  • JDBC Driver Types
  • DataSource
    • Java EE and DataSource, Using JNDI
  • Connection Pooling
    • Overview, Usage, Advantages
  • Labs:
    • Lab series creating DAO using JBDC

Advanced Topics

  • Other Database Access Technologies
    • SQLJ, O-R Mapping Tools, JDO (Java Data Objects), EJB Entity Beans
  • Advanced JDBC Features
    • Batch Updates, Srollable Result Sets, Rowsets, User Defined Types, BLOBS, CLOBS

Component Integration and EJB

Database Integration

  • Web Architecture choices
  • Connecting servlets to a database via DataSource

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

Other Technologies

  • XML and Web Services
  • JMS – Java Message Service

Labs

  • Accessing a database from a servlet
  • Accessing an EJB from a servlet
Home | About LearningPatterns | Our Services | Legal | Contact Us