⚠️ This project is now part of the EE4J initiative. The activity on this project has been paused while it is being migrated to the Eclipse Foundation. See here for the overall EE4J transition status.
Oracle's implementation of the JavaServer Faces specification
- Download jsf-api.jar. Jsf/jsf-api.jar.zip( 299 k) The download jar file contains the following class files or Java source files. META-INF/MANIFEST.MF javax.faces.
- Download JAR files for javax.faces.2.3 With dependencies Documentation Source code. A simple project with war packaging that depends on JSF 2.2 and javaee 6, in.
Home » com.sun.faces » jsf-api » 2.2.2 Oracle's Implementation of The JSF 2.2 Specification API. » 2.2.2 This is the master POM file for Oracle's Implementation of the JSF 2.2 Specification. MyFaces Core 2.2 Project. This project provides an implementation of the JavaServer Faces 2.2 (JSF 2.2) specification. The API submodule implements all of the classes that are defined in the specification. If you are looking for API documentation about the classes that your JSF application needs to use, then see the javadoc for the API module. The Eclipse WTP JSF Tools Project uses a mechanism provided by the project facets framework to provide the user with download links for JSF libraries. We need to do this now for JSF 2.2. However, we cannot find a download in a format that we can use (Maven won't work). Download JAR files for javax.faces.2.3 With dependencies Documentation Source code. A simple project with war packaging that depends on JSF 2.2 and javaee 6, in that order. Group: javax.faces Artifact: javax.faces-war-archetype Show all versions Show build tool code.
Minimum Requirements
- Java 1.8
- Servlet 3.0 (4.0 recommended)
- EL 3.0
- CDI 1.2 (2.0 recommended)
- JSTL 1.2
- JSONP 1.1 (optional, only when
<f:websocket>
is used) - BV 1.1 (optional, only when
<f:validateBean>
or<f:validateWholeBean>
is used; 2.0 recommended)
Servlet 4.0 will enable JSF 2.3 to serve resources via HTTP/2 push. CDI is explicitly required because since JSF 2.3 the
javax.faces.bean.*
annotations such as @ManagedBean
are deprecated, and several implicit EL objects are produced via CDI producers, and <f:websocket>
manages the WS sessions and events via CDI.Installation
Depending on the server used, JSF may already be built-in (full fledged Java EE containers such as WildFly, JBoss EAP, TomEE, Payara, GlassFish, Liberty, etc.), or not (barebones JSP/Servlet containers such as Tomcat, Jetty, etc.). If the server doesn't ship with JSF built-in, then you need to manually install JSF 2.3 along with CDI 1.2+, JSONP 1.1+ and JSTL 1.2+ as those servlet containers usually also don't even ship with those JSF dependencies.
Non-Maven
In case you're manually carrying around JARs:
- Java EE containers (WildFly, JBoss EAP, TomEE, Payara, GlassFish, Liberty, etc)You don't need to add any JARs to
/WEB-INF/lib
! - Servletcontainers (Tomcat, Jetty, etc)Mar 28, 2019 What's New. Versions 19 18 16 14 12. ETAP 19 Series. Mobile Field Data Collection & Synchronization Version 2.0. This point release is the latest in the ETAP 12 series and includes important updates based on the industry’s latest demands. ETAP continues to expand and enhance its capabilities based on the requirements of the industry. Etap latest version. Mar 17, 2019 ETAP is a program designed to help electrical engineers in the processes of designing, simulating, operating and optimizing power systems. The program allows you to perform load flow analysis, short-circuit analysis, motor acceleration analysis, harmonic analysis and transient stability analysis. Latest version: 16.0.0.Add below JARs to
/WEB-INF/lib
:javax.json-api-1.1.jar
(optional, only when<f:websocket>
is used)javax.json-1.1.jar
(optional, only when<f:websocket>
is used)validation-api-2.0.0.Final.jar
(optional, only when<f:validateBean|validateWholeBean>
is used)hibernate-validator-6.0.1.Final.jar
(optional, only when<f:validateBean|validateWholeBean>
is used)
Substitutex
with latest 2.3.x version number. Download db2jcc jar.
Maven
In case you're using Maven, you can find below the necessary coordinates:
- Java EE containers (WildFly, JBoss EAP, TomEE, Payara, GlassFish, Liberty, etc)In case you're targeting a Java EE 7.0 runtime, then you should manually upgrade any runtime-provided JSF 2.2 library to JSF 2.3 depending on the server used. In case of WildFly/JBoss EAP, you need to manually package
jsf-api.jar
andjsf-impl.jar
based onjavax.faces.jar
first. In case of TomEE, just swap themyfaces*.jar
files withjavax.faces.jar
in server's/lib
folder. In case of Payara/GlassFish, just swap thejavax.faces.jar
file in server's/glassfish/modules
folder. - Servletcontainers (Tomcat, Jetty, etc)You can check
org.glassfish:javax.faces
repository to find current latest Mojarra 2.3.x version.
Hello World Example
We assume that you already know how to create an empty Maven WAR Project or Dynamic Web Project in your favourite IDE with a CDI 1.2+ compatible
/WEB-INF/beans.xml
deployment descriptor file (which can be kept fully empty). Don't forget to add JARs or configure pom.xml if necessary, as instructed in previous chapter.Controller
Optionally, register the
FacesServlet
in a Servlet 3.0+ compatible deployment descriptor file /WEB-INF/web.xml
as below:Noted should be that JSF 2.2+ is already 'implicitly' registered and mapped on
*.jsf
, *.faces
and /faces/*
when running on a Servlet 3.0+ container. This will be overridden altogether when explicitly registering as above. The *.xhtml
URL pattern is preferred over above for security and clarity reasons. JSF 2.3+ adds *.xhtml
to set of default patterns, hence the FacesServlet
registration being optional. But when you don't explicitly map it on *.xhtml
, then people can still access JSF pages using *.jsf
, *.faces
or /faces/*
URL patterns. This is not nice for SEO as JSF by design doesn't 301-redirect them to a single mapping.The JSF deployment descriptor file
/WEB-INF/faces-config.xml
is fully optional, but if any it must be JSF 2.3 compatible, otherwise JSF 2.3 will run in a fallback modus matching the exact version
as declared in <faces-config>
root element.Model
Then create a backing bean class as below:
Noted should be that in reality in the average Java EE application the above 'model' is further breakdown into a JPA entity, an EJB service and a smaller backing bean. The JPA entity and EJB service then basically act as a true 'model' and the backing bean becomes a 'controller' for that model. This may in first place be confusing to starters, but it all depends on the point of view. See also What components are MVC in JSF MVC framework? and JSF Controller, Service and DAO.
View
Finally create a Facelets file
/hello.xhtml
as below:Start the server and open it by
http://localhost:8080/contextname/hello.xhtml
.Activating CDI in JSF 2.3
By default, JSF 2.3 will run in JSF 2.2 modus as to CDI support. Even when you use a JSF 2.3 compatible
faces-config.xml
. In other words, the new JSF 2.3 feature of injection and EL resolving of JSF artifacts (spec issue 1316) won't work until you explicitly activate this. In other words, @Inject FacesContext
doesn't work by default. This is necessary in order for JSF 2.3 to be fully backwards compatible.There is currently only one way to activate CDI in JSF 2.3 and herewith make JSF 2.3 to run in full JSF 2.3 modus. Put the
@FacesConfig
annotation on an arbitrary CDI managed bean. For example, a general startup/configuration bean.Building
In case you want to checkout this repository and manually build from source yourself (if necessary after editing source code), here are the instructions:
JSF 2.4 (JSF.next)
- Make sure that you have JDK 1.8, Ant and Maven installed.
- Checkout branch
master
. - Run the following commands from the root directory of the project:
- The binary is now available as
impl/target/javax.faces-2.4.x-SNAPSHOT.jar
.
JSF 2.3
- Make sure that you have JDK 1.8, Ant and Maven installed.
- Checkout branch
MOJARRA_2_3X_ROLLING
. - Run the following commands from the root directory of the project:
- The binary is now available as
impl/target/javax.faces-2.3.x-SNAPSHOT.jar
.
JSF 2.2
- Make sure that you have JDK 1.6, Ant and Maven installed.
- Checkout branch
MOJARRA_2_2X_ROLLING
. - Edit
build.properties
according to your environment. Ifbuild.properties
does not exist, then create a copy ofbuild.properties.glassfish
,build.properties.tomcat
orbuild.properties.weblogic
, depending on your target server. Below example assumes GlassFish or Payara:Only thejsf.build.home
property is mandated to be edited in yourbuild.properties
. It must represent the absolute path to the root directory of the project. - Run the following command from the root directory of the project:
- The binary is now available as
jsf-ri/build/mvn/target/javax.faces-2.2.x-SNAPSHOT.jar
.
Editing source code with IDE
In case you want to checkout to edit the source code of Mojarra with full IDE support, here are the instructions. Note that this only allows you to edit the code. Actually building the Mojarra artefacts still has to be done using the instructions provided above.
Eclipse
JSF 2.4 (JSF.next)
- Checkout branch
master
using File -> import -> Git - Right click the Mojarra project after checkout, choose Configure -> Convert to Maven Project
JSF 2.3
- Checkout branch
master
using File -> import -> Git - Switch to 2.3 rolling branch using Team -> Switch to -> Other -> Remote Tracking -> origin/MOJARRA_2_3X_ROLLING -> New Branch
- Go to the commandline and cd into the directory where Mojarra was checked-out.
- Follow the instructions for build JSF 2.2 from the build instructions above from step 3 (copy/edit properties, run ant)
- Go back to Eclipse and refresh the Eclipse project
Pull Requests
Pull requests are accepted on following branches:
master
(JSF.next)MOJARRA_2_3X_ROLLING
(2.3.x)MOJARRA_2_2X_ROLLING
(2.2.x)
Note that it's okay to send a PR to the master branch, but these are for JSF.next and not the current 2.3.x version!
Resources
- Oracle Java EE 7 tutorial - JavaServer Faces Technology (currently still JSF 2.2)
JavaServer Faces technology simplifies building user interfaces forJavaServer applications. Developers can build web applications byassembling reuseable UI components in a page; connecting thesecomponents to an application data source; and wiring client-generatedevents to server-side event handlers. This project provides informationon the continued development of the JavaServer Faces specification.
JavaServer Faces (JSF) is a JCP Standard technologyfor authoring component based user interfaces on theJava EE platform. This particular GitHubproject hosts theofficial JSF specification issue tracker.There are three implementations of the JSF specification, all of themdeveloped with OSI approved Open Source licenses.
- JSF 2.3 is the designated user interface standard forJava EE 8. It went final on 17April 2017.
- JSF 2.2 is the user interface standard forJava EE 7 The most recentmajor release of JSF is 2.2. This release occurred on 21 May 2013.
JSF 2.3
JSF 2.3 and Java EE 8 are complete. The executable implementations ofthe JSF 2.3 milestones as well as other versions are available in thejavax.facesrepository.This release is included in GlssFish 5Builds.
The human readable specification may be downloaded from <http://jcp.org/>.
The API is available at Maven Central at these coordinates.
The implementation is also available at these coordinates.
JSF 2.2
The executable implementation of JSF 2.2 is included inGlassFish 4.0.
The human readable specification may be downloaded from<http://jcp.org/>.
The binary specification is available at maven central at these coordinates.
For convenience, the binary specification is also provided inthis zip file,but by downloading it, you are agreeing to the terms and conditionsstated here.
Miscellaneous Downloads
Additional project related downloads are available here
JSF 2.3
Some of many JSF 2.3 related articles may be found in
Jsf 2.2 Jar Files Download
- JSF 2.3 Pre-Public Review EC Update(Ed Burns)
- JSF 2.3 new features (Alin Constantin)
- What’s new in JSF 2.3? (Arjan Tjms)
- Neues aus der Java-Welt: JavaServer Faces 2.3 (German) (Michael Mueller)
JSF 2.2
An overview of new features in JSF 2.2 may be found in this slidesharepresentation<http://www.slideshare.net/edburns/jsf-22-26091922>,the video for which is fromJavaZone 2013.
- By contributing to this project, you are agreeing to the terms of use described in CONTRIBUTING.md