2

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?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Abdallah Ghrb
  • 183
  • 3
  • 13

3 Answers3

3

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:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
1

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
Israelm
  • 1,607
  • 3
  • 23
  • 28
0

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.

enter image description here

It will then search for the libraries and show an option like below,

enter image description here

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/

Community
  • 1
  • 1
Hetal Rachh
  • 1,393
  • 1
  • 17
  • 23