Duration: 4 Days

Description

Complete Java Web Development is a crash course in developing cutting edge Web applications using the latest Java EE 6 technologies from Oracle and the open source community.  The course builds a strong understanding of Servlet technology as the cornerstone of Java’s Web platform.  It then shows how JSPs build on the Servlet architecture.  Additionally, the class shows students how to use JSTL, custom tags and expression language to reduce Java code in Web pages while adding tremendous power and capability to those pages.  The class culiminates in an exploration of Java MVC frameworks like JSF, Struts and Spring MVC.

While focusing on Web technologies, the course also exposes developers to the constant tradeoffs between application robustness and complexity.  This is not a class that focuses on theory.  Participants will find the course is loaded with practical labs and simulations.  After taking this class, developers will be able to build Web applications that perform well, are scalable, and that are easier to maintain.

Learning Objectives

  •  Learn how to use Java servlets in the role of Web application control.
  •  Identify the options to state management in a Java Web application and understand the pros/cons of each.
  •  Understand how JSPs can help separate Web logic and functionality from page layout.
  •  Explore how to make JSPs smaller and more powerful with JSTL, custom tags and expression language.
  •  Explore strategies in the exchange of data between Web pages (views) and business processing (model).
  •  Learn the meaning and importance of MVC.

Audience

This course is designed for Java programmers and Web application designers who have interest in learning how to build or maintain Java Enterprise Edition Web applications.

Prerequisites

A solid understanding of Java is required. An understanding of Web technologies like HTML and HTTP is helpful.

Course Outline

Java EE Overview

  •  Java Enterprise Edition (Java EE)
  •  Multi-Tiers
  •  Container
  •  Java EE APIs

HTTP Basics

  •  HTTP 101 – Web basics
  •  Client to Server Interaction
  •  HTTP Message Initial Line
  •  HTTP Methods
  •  HTTP Status Codes
  •  HTTP Header Fields
  •  The Message Body

Introduction to Servlets

  •  What is a servlet?
  •  The Basic HTTP Servlet
  •  Servlet Life Cycle
  •  The service() method
  •  Web server versus Web Container
  •  Servlet Mapping
  •  Servlet Initialization Parameters
  •  Standard Deployment with War files
  •  Additional Servlet Information and Alternate Servlet Configuration

Request Data

  •  Getting Servlets Data
  •  Query String
  •  HTML Forms
  •  Collecting Data
  •  Header Parameters
  •  Initialization Parameters Revisited & ServletConfig

Cookies

  •  Cookies Defined
  •  Creating Cookies
  •  Retrieving Cookies

HTTP Session

  •  Session Tracking
  •  Using HTTPSession
  •  URL Rewriting
  •  Container Session Support
  •  Attribute Data and Scope
  •  Servlet Context
  •  Multithreading

Invoking Resources

  •  Servlet and Other Resources
  •  Forwarding/Redirecting
  •  Client Redirects
  •  Forwards
  •  Pros and Cons of Forwards and Redirects?
  •  Includes

Filters

  •  Servlet Filters
  •  Making a Filter
  •  Filter Mapping
  •  Filter Initialization Parameters

JSP Introduction

  •  Why JSPs?
  •  What is a JSP?
  •  The JSP HelloWorld
  •  Scriptlets
  •  Implicit Objects
  •  How are Implicit Objects Implemented?
  •  Expressions
  •  Declarations
  •  JSP Comments

 JSP Extras (Directives and Expression Language)

  •  JSP Directives
  •  Page Directive
  •  Buffer and AutoFlush Pagte Directive Attributes
  •  Exception Handling Page Directive Attributes
  •  The ‘exception’ Implicit Object
  •  Include Directive
  •  What is Unified Expression Language?
  •  EL Syntax
  •  EL Operators
  •  EL Variables
  •  EL Implicit Objects
  •  Immediate and Deferred Evaluation
  •  Deactivating EL

Standard Actions

  •  JSP Standard Actions
  •  Tag Syntax
  •  jsp:forward
  •  jsp:include
  •  The Include Directive Revisited
  •  JavaBeans Defined
  •  JavaBean Standard Actions
  •  jsp:useBean, jsp:getProperty, and jsp:setProperty
  •  Additional Action Tags

JSTL

  •  What is JSTL?
  •  Why JSTL?
  •  JSTL Tag Categories
  •  JSTL HelloWorld Example
  •  Core Tags
    •  c:out
    •  c:set
    •  c:if
    •  c:choose
    •  c:forEach
    •  c:forTokens
    •  c:import
    •  c:redirect
    •  c:url
  •  Formatting Tags
    •  fmt:formatNumber
    •  fmt:formatDate
  •  XML Tags
  •  SQL Tags
  •  Functions

Web Application Security

  •  Security Constraints (via deployment descriptor)
  •  Security Constraints (via annotation)
  •  Defining Security Roles
  •  Realms and Identity Storage
  •  Authentication Types
  •  Programmatic Security

JSF 2.0

  •  Model View Controller Architecture
  •  What is JSF?
  •  What you need to do JSF?
  •  JSF Basics – Your First JSF Application
  •  Managed Beans
  •  Facelets
  •  Facelet Templates
  •  JSF HTML and Core Tags
  •  Internationalization/Localization
  •  Validation

Appendix A – Additional Servlet Information

  •  Application Configuration and Web.xml
  •  Welcome pages and Error pages
  •  Filters in web.xml
  •  Web.xml
  •  WAR Deployment with web.xml Files
  •  Proprietary Configuration Information
  •  Servlets and the Competition

Appendix B – HTML/XHTML Reference

  •  HTML Tags
  •  HTML Structure Tags
  •  HTML Basic Text Tags
  •  HTML Forms
  •  HTML Lists
  •  HTML Miscellaneous
  •  HTML Table
  •  HTML Character Entities
  •  XHTML

Appendix C – Custom Tag Libraries

  •  JSP Tags
  •  Creating a Custom Tag
  •  The Tag Library Descriptor (TLD)
  •  Taglib Directive and Use in the JSP
  •  TLD Alias
  •  Handler Class
  •  SimpleTag with Attributes

Appendix D – Struts

  •  What is Struts?
  •  Struts 2 Architecture
  •  Struts Setup
  •  Struts Actions
  •  Results and Result Handling
  •  Action Annotation
  •  Strut Tags
  •  Validation
  •  Interceptors
  •  I18N/L10N

Appendix E – Spring MVC

  •  What is Spring?
  •  Spring Modules
  •  What you need to do Spring
  •  Spring MVC Architecture
  •  Spring MVC Basics – Your First Spring MVC Application
  •  DispatcherServlet
  •  Controllers
  •  View Resolvers
  •  Views
  •  Externalized Messages
  •  Spring MVC Tag Libraries
  • Validation