Eclipse Mojarra
| Company type | Software framework |
|---|---|
| Industry | Software development |
| Predecessor | JavaServer Faces (JSF) |
| Founded | 2001 |
| Founder | Amy Fowler’s team at Sun Microsystems |
| Products | Component-based user interface framework for web applications |
Jakarta Faces, previously known as Jakarta Server Faces and JavaServer Faces (JSF), represents a Java standard designed for creating component-based user interfaces within web applications. It was formalized via the Java Community Process as a component of the Java Platform, Enterprise Edition. As an MVC web framework, JSF facilitates the development of server-side user interfaces by utilizing reusable UI components.[1]
The default templating engine for JSF 2.x is Facelets, whereas JSF 1.x depends on JavaServer Pages (JSP). In addition, developers have the option to create views using XUL or pure Java.[2]
History
The initial Java Specification Request (JSR) that led to JavaServer Faces suggested the package name javax.servlet.ui in 2001.[3]
By mid-2001, Amy Fowler’s team at Sun Microsystems developed the "JavaServer Faces API" (also called "Moonwalk") as a framework aimed at building web-based user interfaces. This provided cross-browser GUI tools leveraging standard HTML.[4]
Developments
Facelets, created specifically for Java Server Faces, became the official view technology starting with JSF 2.0. This change resolved lifecycle conflicts caused by JSP and removed previous developer workarounds.
JSF 2.0 embraced extensive use of Java annotations such as @ManagedBean, @ManagedProperty, and @FacesComponent, which largely eliminated the need for faces-config.xml except in specialized framework extensions. Navigation gained simplicity by allowing page transitions through View or Facelet identifiers without relying on configuration files.
Built-in standardized AJAX support was enhanced through Partial State Saving and DOM updates, improving dynamic page refresh capabilities.
Recent JSF releases incorporate integrated resource management for images, CSS, and JavaScript files. This allows resources to be packaged within component libraries, JAR archives, or consistent application directories while supporting logical naming and version control.
Other improvements introduced in JSF 2.0 include event handling, distinct development/staging/production environments (akin to RAILS_ENV), and an expanded collection of standard components.
Update history
- JSF 4.0 (2022-05-15) – Deprecated features such as native managed beans and native EL references were removed; extended view enabled by default was discontinued; introduced ClientWindowScoped.
- JSF 3.0.0 (2020-10-28) – Transitioned package namespace from Javax to Jakarta.
- JSF 2.3 (2019-09-10) – Released Jakarta Server Pages API for the first time; no changes in API or behavior.
- JSF 2.3 (2017-03-28) – Added search Expressions, extensionless URL support, full-class bean validation, push communication via WebSocket, and improved CDI integration.
- JSF 2.2 (2013-05-21) – Introduced stateless views, page flow concepts, and portable resource contracts.
- JSF 2.1 (2010-11-22) – Minor maintenance update with minimal specification modifications.
- JSF 2.0 (2009-07-01) – Major upgrade enhancing usability, features, and performance; aligned with Java EE 6.
- JSF 1.2 (2006-05-11) – Improvements to core system and API; first inclusion in Java EE 5.
- JSF 1.1 (2004-05-27) – Bug-fix release without specification alterations.
- JSF 1.0 (2004-03-11) – Initial official specification release.
Operational Overview
JavaServer Faces (JSF) utilizes a component-based user interface architecture, relying on XML documents known as view templates or Facelets views. Incoming requests are managed by the FacesServlet, which loads the relevant view template, constructs a component hierarchy, handles event processing, and generates the client response—commonly in HTML format. At the conclusion of each request, UI component states along with other scoped data are preserved through stateSaving, then reinstated when the view is reconstructed. This state persistence can occur either on the client side or server side.
Integration of JSF with AJAX
JSF is often paired with AJAX, a programming approach that facilitates dynamic and interactive user interfaces. Early JSF implementations such as Mojarra and Apache MyFaces initially supported only HTML output, necessitating AJAX incorporation through JavaScript. Over time, JSF evolved to accommodate multiple rendering formats, enabling native support for AJAX-enabled components.
The introduction of JSF 2.0 brought a standardized AJAX request lifecycle, streamlining development by allowing client-initiated events to undergo validation, conversion, and method execution prior to delivering updates via XML DOM manipulation. Furthermore, JSF 2 provides graceful degradation capabilities for browsers with disabled JavaScript, thereby improving reliability in enterprise environments.
AJAX-Enabled Frameworks and Component Libraries
Several prominent organizations and projects offer AJAX-capable JSF frameworks or component suites, including:
- Apache MyFaces – Apache Foundation’s JSF implementation featuring AJAX components
- Backbase Enterprise AJAX – JSF Edition – AJAX-centric framework
- BootsFaces – an open-source JSF framework leveraging Bootstrap
- IBM Notes – supports XPages
- ICEfaces – open-source Java JSF extension providing rich AJAX components without requiring JavaScript coding
- JBoss RichFaces (successor to AJAX4jsf) – AJAX-enabled JSF components for layouts, file uploads, forms, and inputs; discontinued as of June 2016
- OmniFaces – open-source utility library for JSF
- OpenFaces – AJAX framework offering JSF components
- Oracle ADF Faces Rich Client – part of Oracle’s Application Development Framework
- PrimeFaces – comprehensive AJAX framework with JSF components
- Sun Java BluePrints AJAX components
- ZK – AJAX framework providing JSF components
ThoughtWorks Perspective, 2014
In the January 2014 edition of its Technology Radar, ThoughtWorks recommended against adopting JSF, stating:
Counterarguments
Responding in February 2014, Çağatay Çivici, PrimeFaces Lead, published "JSF is not what you've been told anymore," addressing these critiques by emphasizing recent enhancements in JSF that embrace contemporary development methodologies and permit integration of custom JavaScript, HTML, and CSS. Regarding state management, Çivici remarked:
DZone Analysis, 2014
In November 2014, Jens Schauder authored an article on DZone titled "Why You Should Avoid JSF," where he criticized Facelets technology for breaching the separation of concerns principle. He argued that intertwining HTML markup with UI update logic complicates maintenance efforts and that the unpredictable behavior of the immediate attribute modifies the server-side lifecycle inconsistently depending on its usage within tags.
TheServerSide, 2016
In a February 2016 publication on the enterprise Java platform TheServerSide, the use of JSF was discouraged because of its negative effects on software quality. The article highlighted five primary disadvantages:
- Straightforward operations turning unnecessarily complicated;
- Restricted adaptability;
- Challenging learning process;
- Inadequate integration with core Java technologies;
- Minimal AJAX functionality.
- ↑ "JSF 2.0 Tutorial". mkyong. 2010-12-12. Retrieved 2017-04-28.
- ↑ NoVDL: Write your JSF views in pure Java
- ↑ "JSR 127: JavaServer Faces". Java Community process. Oracle Corporation. 2014.
- ↑ Armstrong, Eric (2001-06-06). "Java Web services: What's not to like?". JavaWorld.