5 Using JSF and JSTL
This chapter includes the following sections:
Using JSF and JSTL With Web Applications
JSF and JSTL are an integral part of Jakarta EE and, as such, are incorporated directly into WebLogic Server. All Jakarta EE technologies are present on the WebLogic Server classpath. No additional configuration is required to use any of the Jakarta EE technologies in your applications. Applications deployed to WebLogic Server can seamlessly make use of JSF 3.0 and JSTL 2.0 without requiring you to deploy and reference separate shared libraries.
The Jakarta EE API JAR file is included in
WL_HOME\wlserver\server\lib\jakarta.javaee-api-9.1.0.jar
, where
WL_HOME
represents the top-level installation directory for
WebLogic Server.
For information about referencing these shared libraries with your Web applications, see Creating Shared Jakarta EE Libraries and Optional Packages in Developing Applications for Oracle WebLogic Server.
Jakarta Server Faces (JSF)
JSF technology simplifies building user interfaces for JavaServer applications. Developers of various skill levels can quickly build Web applications by: assembling reusable UI components in a page, connecting these components to an application data source, and wiring client-generated events to server-side event handlers.
https://jakarta.ee/specifications/faces/3.0/
. WebLogic
Server support includes:
- Better CDI integration; a CDI-compatible
@ManagedProperty
annotation. - Better WebSocket integration; direct support for WebSockets using
the new
<f:websocket>
tag. - Ajax method invocation.
- Class-level bean validation using the new
<f:validateWholeBean>
tag. - Java date and time support.
- Enhanced component search expression framework.
These features are described in detail in the Java EE Tutorial at https://jakarta.ee/learn/docs/jakartaee-tutorial/9.1/intro/overview/overview.html
and in https://github.com/jakartaee/faces
.
If you selected to install the server examples with your WebLogic Server installation, the sample application demonstrates the following key features of JSF:
- Ajax method invocation using the new
<h:commandScript>
component - CDI converter
- Iterable
h:dataTable
- CDI for evaluation of JSF-specific EL implicit Objects
- CDI injection
- New Java date and time
@ManagedProperty
- Iterable
ui:repeat
- Class-level bean validation using
f:validateWholeBean
- CDI validator
- WebSocket using
f:websocket
The JSF examples are located in
the ORACLE_HOME\wlserver\samples\server\examples\src\examples\javaee8\jsf
directory,
where ORACLE_HOME
represents the directory in which you
installed WebLogic Server.
For more information about the WebLogic Server code examples, see Sample Applications and Code Examples in Understanding Oracle WebLogic Server.
Jakarta Standard Tag Library (JSTL)
The Jakarta Standard Tag Library (JSTL) encapsulates as simple tags the core functionality common to many Web applications. JSTL has support for common, structural tasks, such as:
-
Iteration and conditionals
-
Tags for manipulating XML documents
-
Internationalization tags
-
SQL tags
JSTL also provides a framework for integrating existing custom tags with JSTL tags.
WebLogic Server supports the JSTL 2.0 specification at https://jakarta.ee/specifications/tags/2.0/
.