0
votes

I'm using Tomcat-7.0.33 which has the built-in jsf-implementation Mojarra. Is that right?

I want to move to Apache MyFaces. What i did, to achieve this:

I've removed from /WEB-INF/lib/

  1. jsf-api-2.1.7
  2. jsf-impl-2.1.7

Added in /WEB-INF/lib/:

  1. myfaces-api-2.1.10
  2. myfaces-impl-2.1.10
  3. plus the 5 apache commons-jars

So my completly /lib-folder:

  1. commons-beanutils-1.8.3
  2. commons-codec-1.3
  3. commons-collections-3.2
  4. commons-digester-1.8
  5. commons-logging-1.1.1
  6. gson-2.2.2
  7. jstl-1.2
  8. myfaces-api-2.1.10
  9. myfaces-impl-2.1.10
  10. prettyfaces-jsf2-3.3.3
  11. primefaces-3.4

I'm using Eclipse 4.2 (Juno). I've cleaned the Tomcat-Server.

When i request one of my pages, everything looks fine (even the source). But my Managed-Beans does not work. Seems that JSF don't register/find them.

I guess i don't need to post my faces or beans here, because with mojarra it works fine.

1
Note: Tomcat doesn't ship with any JSF implementation built-in. You've provided it yourself in flavor of those jsf-api and jsf-impl JAR files. If Tomcat had it builtin, you wouldn't have the need to provide any JSF JAR.BalusC

1 Answers

1
votes

MyFaces is conflicting with another instance of itself. The myfaces-bundle.jar already contains both the API and impl. You need to include either

  • myfaces-api.jar
  • myfaces-impl.jar

or

  • myfaces-bundle.jar

but not both.