1
votes

Up to this point I've been running JSF 1.2 apps on Tomcat 6.0. I have now started a new JSF 2.0 project on a different instance of Tomcat (For testing).

I would like to deploy the new JSF 2.0 project on the main Tomcat 6.0 server and am facing the challenge of "telling" the new project to use the 2.0 libraries while the old projects should keep on using the old libraries.

All the libraries are common per server (Although the build path is obviously per project). What I would like to know is how to tell a project to use the JSF 2.0 API.

Thanks!

3

3 Answers

3
votes

Tomcat does not ship with JSF at all, so just giving each project their own correct versioned JSF libraries in the /WEB-INF/lib should work without any issues.

Update I overlooked that the JSF 1.2 libs are supplied by Tomcat itself. In this case you need to upgrade the JSF 1.2 libs in Tomcat to JSF 2.0 libs. JSF 2.0 is fully backwards compatible with JSF 1.2. For Tomcat servers it is not possible to configure the webapp in some way that it overrides the Tomcat-supplied libs with the webapp-supplied libs. You will end up with collisions in the classpath.

0
votes

Well you can take the JSF jar out of Tomcat's classpath & pack the needed version with each WAR, other than that, I don't think you'll be able to do it...

0
votes

Well.. You just need to make required lib available in your class path and you need to do these changes in your configurations and it should pick up correct lib