{"id":22280933,"url":"https://github.com/eclipse-ee4j/mojarra","last_synced_at":"2026-01-17T06:23:47.402Z","repository":{"id":37587458,"uuid":"129259201","full_name":"eclipse-ee4j/mojarra","owner":"eclipse-ee4j","description":"Mojarra, a Jakarta Faces implementation","archived":false,"fork":false,"pushed_at":"2026-01-11T18:53:09.000Z","size":16998,"stargazers_count":178,"open_issues_count":9,"forks_count":125,"subscribers_count":31,"default_branch":"master","last_synced_at":"2026-01-11T22:16:28.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-ee4j.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-04-12T13:53:46.000Z","updated_at":"2026-01-11T14:18:24.000Z","dependencies_parsed_at":"2026-01-05T07:01:02.647Z","dependency_job_id":null,"html_url":"https://github.com/eclipse-ee4j/mojarra","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-ee4j/mojarra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-ee4j%2Fmojarra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-ee4j%2Fmojarra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-ee4j%2Fmojarra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-ee4j%2Fmojarra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-ee4j","download_url":"https://codeload.github.com/eclipse-ee4j/mojarra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-ee4j%2Fmojarra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T16:10:27.002Z","updated_at":"2026-01-17T06:23:47.372Z","avatar_url":"https://github.com/eclipse-ee4j.png","language":"Java","funding_links":[],"categories":["开发框架"],"sub_categories":[],"readme":"\u003c!---\n[//]: # \" Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.\n[//]: # \"  \"\n[//]: # \" This program and the accompanying materials are made available under the \"\n[//]: # \" terms of the Eclipse Public License v. 2.0, which is available at \"\n[//]: # \" http://www.eclipse.org/legal/epl-2.0. \"\n[//]: # \"  \"\n[//]: # \" This Source Code may also be made available under the following Secondary \"\n[//]: # \" Licenses when the conditions for such availability set forth in the \"\n[//]: # \" Eclipse Public License v. 2.0 are satisfied: GNU General Public License, \"\n[//]: # \" version 2 with the GNU Classpath Exception, which is available at \"\n[//]: # \" https://www.gnu.org/software/classpath/license.html. \"\n[//]: # \"  \"\n[//]: # \" SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 \"\n--\u003e\n\n# Mojarra 5.0\n\nEclipse's implementation of the Jakarta Faces 5.0 specification\n\n* Mojarra 5.0 - this branch, under development\n* [Mojarra 4.1](https://github.com/eclipse-ee4j/mojarra/blob/4.1/README.md) - stable release\n* [Mojarra 4.0](https://github.com/eclipse-ee4j/mojarra/blob/4.0/README.md) - stable release\n* [Mojarra 3.0](https://github.com/eclipse-ee4j/mojarra/blob/3.0/README.md) - legacy release\n* [Mojarra 2.3](https://github.com/eclipse-ee4j/mojarra/blob/2.3/README.md) - legacy release\n\nFor support on Mojarra 2.3 and earlier please contact your vendor for support (RedHat, IBM,\nOracle, Omnifish, Payara, etceteras)\n\n## Minimum Requirements\n\n- Java 17\n- Jakarta Servlet 6.1\n- Jakarta Expression Language 6.0\n- Jakarta CDI 4.1\n- Jakarta Web Socket 2.2 (optional, only when `\u003cf:websocket\u003e` is used)\n- Jakarta JSON Processing  2.1 (optional, only when `\u003cf:websocket\u003e` is used)\n- Jakarta Validation 3.1 (optional, only when `\u003cf:validateBean\u003e` or `\u003cf:validateWholeBean\u003e` is used)\n\n\n## Installation\n\nDepending on the server used, Jakarta Faces may already be built-in (full fledged Jakarta EE containers such as [WildFly][1], [JBoss EAP][2], [TomEE][3], [Payara][4], [GlassFish][5], [Liberty][6], etc.), or not (barebones Jakarta Server Pages/Jakarta Servlet containers such as [Tomcat][7], [Jetty][8], etc.). If the server doesn't ship with Jakarta Faces built-in, then you need to manually install Jakarta Faces 4.0 along with CDI 4.0+, Jakarta JSON Processing 2.0+ and Jakarta Standard Tag Library 2.0+ as those Jakarta Servlet containers usually also don't even ship with those Jakarta Faces dependencies.\n\n\n### Non-Maven\n\nIn case you're manually carrying around JARs:\n\n- **Jakarta EE containers (WildFly, JBoss EAP, TomEE, Payara, GlassFish, Liberty, etc)**\n\n    You don't need to add any JARs to `/WEB-INF/lib`!\n\n- **Jakarta Servlet containers (Tomcat, Jetty, etc)**\n\n    Add below JARs to `/WEB-INF/lib`:\n\n    - [`jakarta.faces.4.1.x.jar`][9]\n    - [`weld-servlet-shaded-4.1.0.Final.jar`][10]\n    - [`jakarta.json-api-2.1.0.jar`][12] (optional, only when `\u003cf:websocket\u003e` is used)\n    - [`jakarta.json-2.1.0.jar`][12a] (optional, only when `\u003cf:websocket\u003e` is used)\n    - [`jakarta.validation-api-3.1.0.jar`][13] (optional, only when `\u003cf:validateBean|validateWholeBean\u003e` is used)\n    - [`hibernate-validator-8.0.x.Final.jar`][14] (optional, only when `\u003cf:validateBean|validateWholeBean\u003e` is used)\n\n    Substitute `x` with latest version number available.\n\n### Maven\n\nIn case you're using Maven, you can find below the necessary coordinates:\n\n- **Java EE containers (WildFly, JBoss EAP, TomEE, Payara, GlassFish, Liberty, etc)**\n\n    ```xml\n    \u003cdependency\u003e\n       \u003cgroupId\u003ejakarta.platform\u003c/groupId\u003e\n       \u003cartifactId\u003ejakarta.jakartaee-api\u003c/artifactId\u003e\n       \u003cversion\u003e11.0.0\u003c/version\u003e\n       \u003cscope\u003eprovided\u003c/scope\u003e\n    \u003c/dependency\u003e\n    ```\n\nIn case of WildFly/JBoss EAP, [you need to manually package `jsf-api.jar` and `jsf-impl.jar` based on `jakarta.faces.jar` first][15]. In case of TomEE, just swap the `myfaces*.jar` files with `jakarta.faces.jar` in the server's `/lib` folder. In case of Payara/GlassFish, just swap the `jakarta.faces.jar` file in the server's `/glassfish/modules` folder.\n\n- **Servletcontainers (Tomcat, Jetty, etc)**\n\n    ```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.glassfish\u003c/groupId\u003e\n        \u003cartifactId\u003ejakarta.faces\u003c/artifactId\u003e\n        \u003cversion\u003e\u003c!-- Use latest 4.0.x version. --\u003e\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.jboss.weld.servlet\u003c/groupId\u003e\n        \u003cartifactId\u003eweld-servlet-shaded\u003c/artifactId\u003e\n        \u003cversion\u003e4.1.0.Final\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e \u003c!-- Optional, only when \u003cf:websocket\u003e is used. --\u003e\n        \u003cgroupId\u003eorg.glassfish\u003c/groupId\u003e\n        \u003cartifactId\u003ejakarta.json\u003c/artifactId\u003e\n        \u003cversion\u003e2.1.0\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e \u003c!-- Optional, only when \u003cf:validateBean\u003e or \u003cf:validateWholeBean\u003e is used. --\u003e\n        \u003cgroupId\u003eorg.hibernate.validator\u003c/groupId\u003e\n        \u003cartifactId\u003ehibernate-validator\u003c/artifactId\u003e\n        \u003cversion\u003e\u003c!-- Use latest 8.0.x version. --\u003e\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n    You can check [`org.glassfish:jakarta.faces`][16] repository to find the latest Mojarra 4.0.x version.\n\n\n## Testing\n\nSince Mojarra 4, tests have been moved to the [Faces project](https://github.com/jakartaee/faces/tree/master/tck).\n\n\n## Hello World Example\n\nWe assume that you already know how to create an empty Maven WAR Project or Dynamic Web Project in your favourite IDE with a CDI 4.0+ 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.\n\n### Controller\n\nOptionally, register the `FacesServlet` in a Servlet 6.0+ compatible deployment descriptor file `/WEB-INF/web.xml` as below:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cweb-app\n    xmlns=\"https://jakarta.ee/xml/ns/jakartaee\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd\"\n    version=\"6.0\"\n\u003e\n    \u003cservlet\u003e\n        \u003cservlet-name\u003efacesServlet\u003c/servlet-name\u003e\n        \u003cservlet-class\u003ejakarta.faces.webapp.FacesServlet\u003c/servlet-class\u003e\n    \u003c/servlet\u003e\n    \u003cservlet-mapping\u003e\n        \u003cservlet-name\u003efacesServlet\u003c/servlet-name\u003e\n        \u003curl-pattern\u003e*.xhtml\u003c/url-pattern\u003e\n    \u003c/servlet-mapping\u003e\n\u003c/web-app\u003e\n```\n\nNoted should be that Jakarta Faces is already \"implicitly\" registered and mapped on `*.xhtml`, `*.jsf`, `*.faces` and `/faces/*` when running on a Jakarta Servlet container. This will be overridden altogether when explicitly registering as above. [The `*.xhtml` URL pattern is preferred over above for security and clarity reasons][17]. When you don't explicitly map it on `*.xhtml`, then people can still access Faces pages using `*.jsf`, `*.faces` or `/faces/*` URL patterns. This is not nice for SEO as Faces by design doesn't 301-redirect them to a single mapping.\n\nThe Faces deployment descriptor file `/WEB-INF/faces-config.xml` is fully optional.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cfaces-config\n    xmlns=\"https://jakarta.ee/xml/ns/jakartaee\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_0.xsd\"\n    version=\"4.0\"\n\u003e\n    \u003c!-- Put any faces config here. --\u003e\n\u003c/faces-config\u003e\n```\n\n### Model\n\nThen create a backing bean class as below:\n\n```java\npackage com.example;\n\nimport jakarta.enterprise.context.RequestScoped;\nimport jakarta.inject.Named;\n\n@Named\n@RequestScoped\npublic class Hello {\n\n    private String name;\n    private String message;\n\n    public void createMessage() {\n        message = \"Hello, \" + name + \"!\";\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n}\n```\n\nNoted should be that in reality in the average Jakarta EE application the above \"model\" is further breakdown into a Jakarta Persistence entity, a Jakarta Enterprise Beans service and a smaller backing bean. The Jakarta Persistence entity and Jakarta Enterprise Beans 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 Faces MVC framework?][18] and [Faces Controller, Service and DAO][19].\n\n### View\n\nFinally create a [Facelets][20] file `/hello.xhtml` as below:\n\n```xml\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\n    xmlns:f=\"jakarta.faces.core\"\n    xmlns:h=\"jakarta.faces.html\"\u003e\n    \u003ch:head\u003e\n        \u003ctitle\u003eHello, World!\u003c/title\u003e\n    \u003c/h:head\u003e\n    \u003ch:body\u003e\n        \u003ch:form\u003e\n            \u003ch:outputLabel for=\"name\" value=\"Enter your name\" required=\"true\" /\u003e\n            \u003ch:inputText id=\"name\" value=\"#{hello.name}\" /\u003e\n            \u003ch:message for=\"name\" /\u003e\n            \u003cbr /\u003e\n            \u003ch:commandButton value=\"Say hello\" action=\"#{hello.createMessage}\"\u003e\n                \u003cf:ajax execute=\"@form\" render=\"@form\" /\u003e\n            \u003c/h:commandButton\u003e\n            \u003cbr /\u003e\n            #{hello.message}\n        \u003c/h:form\u003e\n    \u003c/h:body\u003e\n\u003c/html\u003e\n```\n\nStart the server and open it by `http://localhost:8080/contextname/hello.xhtml`.\n\n## Activating CDI in Jakarta Faces 4.1\n\nCDI is activated by default in Jakarta Faces 4.1 and can´t be deactivated.  \nIt´s not required anymore to add `@FacesConfig` to a CDI managed bean to accomplish this.\nAs of Jakarta Faces 4.0 `@FacesConfig` still removes the need to explicitly add a `FacesServlet` entry to `web.xml`.\n\n## Building\n\nIn case you want to checkout this repository and manually build from source yourself (if necessary after editing source code), here are the instructions:\n\n### Jakarta Faces.Next\n\n1. Make sure that you have JDK 17, Ant and Maven installed.\n2. Checkout branch [`master`][28].\n3. Run the following commands from the root directory of the project:\n\n    ```bash\n    # under the root dir of project\n    mvn clean install\n    ```\n\n4. The binary is now available as `impl/target/jakarta.faces-4.x.x-SNAPSHOT.jar`.\n\n\n\n### Jakarta Faces 4.0\n\n1. Make sure that you have JDK 11, Ant and Maven installed.\n2. Checkout branch [`4.0`][31].\n3. Run the following commands from the root directory of the project:\n\n    ```bash\n    # under the root dir of project\n    mvn clean install\n    ```\n\n4. The binary is now available as `impl/target/jakarta.faces-4.0.x-SNAPSHOT.jar`.\n\n### Jakarta Faces 3.0\n\n1. Make sure that you have JDK 1.8, Ant and Maven installed.\n2. Checkout branch [`3.0`][29].\n3. Run the following commands from the root directory of the project:\n\n    ```bash\n    # under the root dir of project\n    mvn clean install\n    ```\n\n4. The binary is now available as `impl/target/jakarta.faces-3.0.x-SNAPSHOT.jar`.\n\n### Jakarta Faces 2.3\n\n1. Make sure that you have JDK 1.8, Ant and Maven installed.\n2. Checkout branch [`2.3`][30].\n3. Run the following commands from the root directory of the project:\n\n    ```bash\n    # under the root dir of project\n    mvn clean install\n    ```\n\n4. The binary is now available as `impl/target/jakarta.faces-2.3.x-SNAPSHOT.jar`.\n\n### Jakarta Faces 2.2\n\nJakarta Faces 2.2 and lower are not supported by Eclipse. If such support is needed, consult your Jakara EE vendor of choice. \n\n## Editing source code with IDE\n\nIn 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.\n\n### Eclipse\n\n#### Jakarta Faces 4.0\n\n1. Checkout branch [`4.0`][29] using File -\u003e import -\u003e Git\n2. Right click the Mojarra project after checkout, choose Configure -\u003e Convert to Maven Project\n\n#### Jakarta Faces 3.0\n\n1. Checkout branch [`3.0`][29] using File -\u003e import -\u003e Git\n2. Right click the Mojarra project after checkout, choose Configure -\u003e Convert to Maven Project\n\n#### Jakarta Faces 2.3\n\n1. Checkout branch [`2.3`][30] using File -\u003e import -\u003e Git\n2. Right click the Mojarra project after checkout, choose Configure -\u003e Convert to Maven Project\n\n\n## Pull Requests\n\nPull requests are accepted on following branches:\n\n- [`master`][28] (4.0.x)\n- [`3.0`][29] (3.0.x)\n- [`2.3`][30] (2.3.x)\n\nNote that it's okay to send a PR to the master branch, but this one is for Faces.next and not the current 2.3.x or 3.0.x version.\n\n## Releasing\n\npom.xml versions can be adjusted as follows\n\n```\nmvn versions:set -DgroupId=* -DartifactId=* -DoldVersion=* -DgenerateBackupPoms=false -DnewVersion=4.0.1-SNAPSHOT\n```\n\n## Resources\n\n- [JSF 2.3 Specification (JSR 372)][21]\n- [JSF 2.3 API documentation][22]\n- [JSF 2.3 VDL documentation][23]\n- [JSF 2.3 JS documentation][24]\n- [Oracle Java EE 7 tutorial - JavaServer Faces Technology][25] (currently still JSF 2.2)\n- [What's new in JSF 2.3?][26]\n- [Java EE Kickoff Application][27]\n\n\n  [1]: http://wildfly.org/\n  [2]: https://developers.redhat.com/products/eap/overview/\n  [3]: http://tomee.apache.org\n  [4]: http://www.payara.fish\n  [5]: https://javaee.github.io/glassfish/\n  [6]: https://developer.ibm.com/wasdev/websphere-liberty/\n  [7]: http://tomcat.apache.org\n  [8]: http://www.eclipse.org/jetty/\n\n  [9]: https://repo1.maven.org/maven2/org/glassfish/jakarta.faces/\n  [10]: https://repo1.maven.org/maven2/org/jboss/weld/servlet/weld-servlet-shaded/\n  [11]: https://repo.maven.apache.org/maven2/jakarta/servlet/jsp/jstl/jakarta.servlet.jsp.jstl-api\n  [12]: https://repo1.maven.org/maven2/jakarta/json/jakarta.json-api\n  [12A]: https://repo1.maven.org/maven2/org/glassfish/jakarta.json/\n  [13]: https://repo1.maven.org/maven2/jakarta/validation/jakarta.validation-api\n  [14]: https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator\n  \n  [15]: https://stackoverflow.com/q/35899887/157882\n  [16]: http://mvnrepository.com/artifact/org.glassfish/jakarta.faces\n  [17]: https://stackoverflow.com/q/3008395/157882\n  [18]: https://stackoverflow.com/q/5104094/157882\n  [19]: https://stackoverflow.com/q/30639785/157882\n  [20]: http://docs.oracle.com/javaee/7/tutorial/jsf-facelets.htm\n  [21]: http://download.oracle.com/otn-pub/jcp/jsf-2_3-final-eval-spec/JSF_2.3.pdf\n  [22]: https://javaserverfaces.github.io/docs/2.3/javadocs/index.html\n  [23]: https://javaserverfaces.github.io/docs/2.3/vdldoc/index.html\n  [24]: https://javaserverfaces.github.io/docs/2.3/jsdocs/index.html\n  [25]: http://docs.oracle.com/javaee/7/tutorial/jsf-intro.htm\n  [26]: http://arjan-tijms.omnifaces.org/p/jsf-23.html\n  [27]: https://github.com/javaeekickoff/java-ee-kickoff-app\n  [28]: https://github.com/eclipse-ee4j/mojarra\n  [29]: https://github.com/eclipse-ee4j/mojarra/tree/3.0\n  [30]: https://github.com/eclipse-ee4j/mojarra/tree/2.3\n  [31]: https://github.com/eclipse-ee4j/mojarra/tree/4.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-ee4j%2Fmojarra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-ee4j%2Fmojarra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-ee4j%2Fmojarra/lists"}