Question

I have a JSF project which uses Apache MyFaces libraries and and JSTL jars along with Primefaces 3.5. When I import this project in another workspace, all the annotations in the Managed Beans are not recognised. In the project's build path, it shows JSF 2.0 (Apache MyFaces JSF Core-2.0 API 2.0.2) and JSTL libraries without any jars. I use Tomcat.

JSF 2.0 library in the original project contains the following jars:

commons-beanutils-1.8.3.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-discovery-0.4.jar
commons-logging-1.1.1.jar
myfaces-api-2.0.2.jar
myfaces-impl-2.0.2.jar

And my JSTL library contains the following in the original project:

javax.servlet.jsp.jstl-1.2.1.jar
javax.servlet.jsp.jstl-api-1.2.1.jar

These are missing in the imported project when I see the build path. Am I missing any steps? Need help in configuring.

Était-ce utile?

La solution

JAR files referenced by custom defined user libraries in Eclipse are indeed not exported along the project when you choose "Export as Eclipse project" option. The importer is supposed to have the very same user libraries in its Eclipse environment.

You have several options:

  1. Create the same user libraries yourself.

  2. Use "Export as WAR" option instead. Eclipse will include the libraries in /WEB-INF/lib.

  3. Manually include those JARs in project's /WEB-INF/lib yourself.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top