I know that a minimal API is 4 jars, I remember facelets*.jar. What are the minimal JSF jars needed to deploy a JSF app with Tomcat?
3 Answers
Just use the JAR files which are provided/required by the JSF implementation you choose to use. Just download the implementation and read their own installation/users guide if you don't actually need more JAR files (as dependencies).
As of now there are only two major JSF implementations: Mojarra and MyFaces. The number of JAR files may vary per implementation and even version. Ultimately you need to make sure that you have both the JSF API and JSF implementation (which may exist of 2 or even 1 JAR file, depending on impl/version). MyFaces requires more commons-*.jar
dependencies while Mojarra doesn't require any additional dependencies.
Since JSF 2.0, Facelets is bundled with the JSF implementation and has replaced JSP as default view technology.
See also:
-
-
Since late 2007 (over 4 years ago!), "Sun RI" got a real name "Mojarra". See also http://stackoverflow.com/questions/7162190/what-is-mojarra – BalusC Feb 12 '12 at 19:35
These two are enough to start a simple web app using JSF 2.1 with tomcat 7.
javax.faces-2.1.14.jar
and
jstl-1.1.0.jar

- 1,607
- 3
- 23
- 28
You can run a JSF application with tomcat by either including Mojarra libraries or by including jars.
1. To include Mojarra libraries,
While creating an JSF application, it asks for JSF implementation library. Select option 'User library' and then click on 'Download library' option as shown in the below image.
It will then search for the libraries and show an option like below,
Select the mojarra library and then accept the "Terms and conditions" and click on "Finish".
2. Include below jars
Download JSF-API Jar http://central.maven.org/maven2/com/sun/faces/jsf-api/
Download JSF-IMPL Jar http://central.maven.org/maven2/com/sun/faces/jsf-impl/

- 1
- 1

- 1,393
- 1
- 17
- 23