877-277-2477
info@capstonecourseware.com
113-WL. JSTL with WebLogic
Version 10.3.0

Book cover

This two-day module introduces the JSTL, or JSP Standard Tag Library, actually a set of four custom tag libraries that establish a portable standard for common processing tasks in JSP. JSTL is a major part of the new scriptless authoring style encouraged (and enabled) by the JSP 2.0 specification. This module covers all four JSTL libraries in depth:

  • The core actions, which support JSP expressions for JSP 1.x containers, flow control for procedural processing in JSPs, and resource access
  • The formatting and internationalization/localization actions, which standardize formatted numeric and date/time output as well as multi-language support
  • The SQL actions, which dramatically simplify access to relational data from a JSP
  • The XML actions, which give JSPs a simple, powerful framework by which to parse, address and transform XML data using XPath and XSLT

Each individual tag in each library is covered, with precise syntactic rules shown in a standard format in the student guide, and JSTL techniques and best practices are discussed for each library. An extensive set of example applications illustrates common usage of each major group of actions, and the module culminates with a wrap-up workshop that brings core, SQL, and XML techniques to bear in a single application.

This version of the course is designed to work with Oracle® WebLogic 10.3: labs are all tested on this platform.

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

  • Students should be well-versed in JSP page authoring. Knowledge of JSP 2.0 is a plus, but is not required; the module's primary audience is JSP 1.x authors. Course 112-WL is excellent preparation.

Learning Objectives

  • Describe the use of the JSP expression language to simplify dynamic page output.
  • Write JSP expressions and implement JSPs that use them in favor of scripts.
  • Implement JSPs that use basic JSTL actions to simplify presentation logic.
  • Decompose a JSP application design into fine-grained, reusable elements including JavaBeans, custom tag handlers and tag files that use JSTL.
  • Use core JSTL actions to complement standard actions, custom actions, and JSP expressions for seamless, script-free page logic.
  • Direct conditional and iterative processing of page content by looping through ranges of numbers, over elements in a collection, or over tokens in a master string.
  • Import external resources by URL for processing, or redirect the JSP container to an external resource to handle the current request.
  • Set locale and time zone information in JSPs, and use them to correctly format numbers, dates and times for all clients.
  • Use resource bundles to manage application strings, and produce the appropriate strings at runtime for a particular client locale.
  • Locate a data source, query for relational data, and parse result sets.
  • Perform updates, inserts and deletes on relational data using SQL actions.
  • Manage queries and updates in transaction contexts.
  • Parse XML content from a variety of sources.
  • Derive information from parsed XML content using XPath expressions.
  • Implement conditional processing and loops based on XML information.
  • Apply XSLT transformations to XML content.
  • Implement a simple Web service that reads and writes SOAP.

Timeline: 2 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 10.3

  • In addition to the primary lab files, an optional overlay is available that adds support for WebLogic Workshop 10.3. Students can code, build, deploy, and test many exercises from within the IDE. Some exercises that use shared custom tags or require special server configurations must be deployed from a DOS console. 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. JSTL Overview

  • The JSP Standard Tag Library
  • The JSP Expression Language
  • EL Syntax
  • Type Coercion
  • Error Handling
  • Implicit Objects for EL
  • JSTL Namespaces
  • Using JSTL in a Page
  • Installing WebLogic's JSTL Support
  • The Core Actions
  • Going Scriptless
  • Object Instantiation
  • Sharing Objects
  • Decomposition
  • Parameterization

Chapter 2. The Core Actions

  • The JSTL Core Library
  • <c:out>
  • <c:set>
  • Gotchas
  • Conditional Processing
  • Iterative Processing
  • Iterating Over Maps
  • Tokenizing Strings
  • Catching Exceptions
  • Resource Access

Chapter 3. The Formatting and i18n Actions

  • The JSTL Formatting Library
  • Locales
  • Determining Locale
  • Time Zones
  • Setting Locale and Time Zone
  • Formatting and Parsing Dates
  • Formatting and Parsing Numbers
  • Internationalization
  • Working with Resource Bundles
  • Supporting Multiple Languages

Chapter 4. The SQL Actions

  • The JSTL SQL Library
  • Using Relational Data
  • Connecting with a DriverManager
  • Connecting via a DataSource
  • The WebLogic Administration Console
  • Configuring Data Sources for WebLogic
  • The Result Interface
  • Making a Query
  • Inserts, Updates and Deletes
  • Parameterized SQL
  • Transactions

Chapter 5. The XML Actions

  • The JSTL XML Library
  • Using XML
  • XML Data Sources
  • Parsing and Addressing
  • Using XPath in JSTL
  • XPath vs. EL
  • XPath Context
  • Implicit Objects for XPath
  • Conditional Processing
  • Iterative Processing
  • Changing XPath Context
  • Working with XML Namespaces
  • Using XSLT
  • Chaining Transformations
  • Reading XML from the Request Body
  • XML and SOAP Web Services

Appendix A. Appendix. Learning Resources

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.