Developing JEE Web Applications

Duration: 3 days
Type: intermediate

Description

This course is an in-depth introduction to JEE 5 Web Application development. The Servlet and JSP API's are covered in detail as well as real world issues such as threading, MVC frameworks and unit testing.

By default Spring MVC is used as an example web framework, but alternatives such as Struts 2 and JSF can be used as required.

Prerequisites

Delegates should be competent Java developers who are proficient in HTML. Prior experience editing XML documents is an advantage.

List of Modules

Introduction to the JEE

The evolution of Enterprise Java
JEE components, services and protocols
An in-depth look at a JEE Container
JEE architectures in common use
Open source tools used with JEE

Java Naming and Directory Interface

The need for a single JEE naming service
Common uses of JNDI in JEE applications
Understanding the JNDI naming tree
Navigating the tree with Context objects

Packaging Applications in a Web Archive

The structure of a WAR file
Adding static content to a WAR
Introducing the deployment descriptor
Specifying the application welcome page
Adding classes and libraries to a WAR
Building and deploying a simple Servlet
Concurrency issues with Servlet objects
Understanding dynamic class reloading
Container specific deployment issues
Adding filters to Web Applications

Developing Java Servlets

The organization of the Servlets API
Loading initialization parameters
Accessing HTTP parameters
HTTP error codes and redirection
Understanding session and context objects
Storing client specific data as attributes
Forwarding a request to another Servlet
Including the content of other resources
Exception handling in Servlets

Developing Simple Java Server Pages

The JSP compilation model
Examining a generated Servlet class
Placing Java code inside scriptlets
Placing Java code in expressions
Adding declarations to a JSP Page
Using the include directive
Controlling JSP compilation via the attributes of the page directive
Exception handling in JSP Pages

Advanced Java Server Pages

Writing JSP pages as XML documents
Using actions for request dispatching
Using actions to manipulate JavaBeans
Using form based authentication to validate users

Unit Testing Web Frameworks

An overview of web testing frameworks
Low level web testing with HttpUnit
High level testing with HtmlUnit and JWebUnit
Browser based testing using WatiJ and Selenium

Developing JSP Tag Libraries (Overview)

Understanding the tag extension API
Writing Tag Library Descriptors (TLD's)
Creating simple custom actions

The Role of MVC in Web Application Design

Model 1 verses Model 2 Design
The role of a Front Controller Servlet
The role of an Application Controller
Using Value and Transfer Objects
Where should validation occur?
Approaches to O/R mapping

An Example MVC Web Framework

Introduction to Spring and Dependency Injection
Components of the Spring MVC web framework
Configuring the Spring Dispatcher Servlet
Decorating controllers with annotations
Triggering a JSP via a View Resolver