Thursday, December 8, 2011

Barebones JSF2 Eclipse project

Quick view on minimal libraries required to get a JSF2 project running in Eclipse (should work everywhere else):
  • com.springsource.javax.servlet.jsp-2.1.0.jar ==> Obtained from Spring framework dependencies package
  • com.springsource.javax.servlet.jsp.jstl-1.1.2.jar ==> Obtained from Spring framework dependencies package
  • javax.faces.jar ==> Obtained from http://javaserverfaces.java.net/.  Downloaded Mojarra 2.1 release.  Available in Spring framework dep package, but it's an older version (1.2).
  • jstl-impl-1.2.jar  ==> Obtained from http://jstl.java.net/.  Available in Spring framework dep package, but it's an older version (1.1.2).
You can start developing a JSF2 app with just these 4 files.  Have tried the following:
  • Facelets (xmlns:ui="http://java.sun.com/jsf/facelets")
  • HTML elements (xmlns:h="http://java.sun.com/jsf/html")
  • Core elements (xmlns:f="http://java.sun.com/jsf/core")
I used Apache Tomcat 7.  But I'm sure this will work with other app server/servlet containers as well.  

No comments: