877-277-2477
info@capstonecourseware.com
115-WL. JavaServer Faces with WebLogic
Version 10.3.0

Book cover

This course introduces the JavaServer Faces API for Java web application development. Proceeding from a foundation of Java, Servlets, and JSP, the course develops the best-practice concepts of MVC architecture and command-object encapsulation that propel the JSF architecture. Students create JSF web applications on the Oracle® WebLogic platform, organizing their pages as JSF component trees, and their server-side code as JSF managed beans and controllers. They add data-conversion and validation logic and learn to work with JSF's data-table control.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. No association with or endorsement by Oracle Corporation is implied by the use of these terms in this document.

Prerequisites

  • General note: This course is intended primarily for experienced Java application developers. Page authors, component developers, and others who may have little or no Java experience (but perhaps are stronger on HTML and JSP) may well find this to be a valuable training experience, though without solid Java skills many of the coding exercises will be difficult to follow.
  • Java programming experience is essential to understanding the JSF API as presented here -- Course 103 is excellent preparation.
  • JSP page-authoring experience is required -- Course 112-WL.
  • Servlets programming experience is recommended but not required -- Course 110-WL.
  • Basic knowledge of XML will be helpful, as will any previous experience with HTML.

Learning Objectives

  • Understand the purpose and scope of the JSF architecture
  • Build Web applications using JSF's FacesServlet, faces-config.xml, and the JSF request/response lifecycle
  • Use the JSF custom tag libraries to build JSF views as JSPs.
  • Use managed beans to encapsulate not only server-side form handling but also client-side presentation logic
  • Implement control logic as JSF event listeners or action methods.
  • Use validators and converters to implement a validation phase for a JSF application

Timeline: 3 days.

Server Support: WebLogic

  • This version of the course works with the WebLogic server. Our Java EE courses are available in variants that support various server products, including Tomcat, GlassFish, JBoss, and WebLogic. For more details, and to find a desired server-specific version of a course, see our server-support matrix.

IDE Support: WebLogic Workshop

  • In addition to the primary lab files, an optional overlay is available that adds support for WebLogic Workshop. Students can code, build, deploy, and test all exercises from within Eclipse, and take advantage of WTP's built-in editors, integrated debugging, and wizards for web applications, XML files, JSPs, and more. See also our orientation to Using Capstone's Eclipse Overlays, and please be advised that this is an optional feature; it is not a separate version of the course, and the course itself does not contain explicit Eclipse-specific lab instructions.

Chapter 1. Overview

  • Java EE and Web Applications
  • Perspectives: Servlets and JSP
  • The Model/View/Controller Pattern
  • Perspectives: MVC Frameworks
  • The Command Pattern
  • Perspectives: AWT and JFC
  • JSF Value Proposition
  • The WebLogic Server
  • WebLogic JSF Support
  • JSF Configuration

Chapter 2. Lifecycle and Page Navigation

  • The JSF Request/Response Cycle
  • Lifecycle Phases
  • The FacesContext Class
  • Who Does What
  • View Selection
  • Navigation Rules
  • Outcomes

Chapter 3. User Interface Components

  • The Composite View Pattern
  • The UIComponent Class
  • Behavioral Interfaces
  • The Core and HTML Tag Libraries
  • Relationship to CSS
  • ID, Client ID, and Label
  • The UISelectItem(s) Class
  • Navigating the UI Tree

Chapter 4. Managed Beans

  • JavaBeans and JSF
  • Backing Beans
  • The Factory Pattern
  • Managed Beans
  • Coarse-Grained Beans
  • The Unified Expression Language
  • Value Expressions
  • Dependency Injection
  • Bean Scopes

Chapter 5. Events and Controllers

  • The Observer Pattern
  • JSF Event Model
  • Event Types and Timing
  • Event Queueing
  • ActionEvent and ActionListener
  • Action Methods
  • Connecting Controllers to Beans
  • Dynamic Outcomes
  • ValueChangeEvent and ValueChangeListener
  • Limitations of FacesListeners

Chapter 6. Converters

  • The Adapter Pattern
  • The Converter Interface
  • Standard Converters
  • Working with Enumerated Types
  • Timing of Conversion
  • Custom Converters
  • Configuring Converters

Chapter 7. Validators

  • Validating Input
  • The Validator Interface
  • Standard Validators
  • Producing Error Messages
  • Message Keys
  • Presenting Error Messages
  • Custom Validators
  • Validating Multiple Inputs
  • Using a PhaseListener

Chapter 8. Data Tables (Optional)

  • Managing Tabular Data
  • The JSF Data Table
  • Columns
  • Facets
  • Limitations and Strategies
  • Nesting Tables

Appendix A. Learning Resources

Appendix B. JSF Quick Reference

  • JSF Custom Tags
  • Packages and Classes
  • JSF API: Finding Things
  • JSF API: Controllers, Converters, and Validators

System Requirements

Hardware Requirements (Minimum) 1 gHz, 1 gB RAM, 3 gB disk space.
Hardware Requirements (Recommended) 2 gHz, 2 gB RAM, 5 gB disk space.
Operating System Tested on Windows XP Professional.
Network and Security Limited privileges required -- please see our standard security requirements.
Software Requirements Course software should be viable on all systems for which WebLogic 10.3 is available.