This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New JSF project getting javax.faces.context.FacesContextFactory

 
J Miller
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I’m having a problem where my JSF isn’t getting parsed correctly. I’m using IBM RAD, and a WebSphere 7 server. I created this page:



If I try to go to the web page using .xhtml in the URL, I get a blank page, and you can see the tags in the source. If I try to use .faces, I get the exception at the bottom.

Here’s what I’ve done:
- Created a new project using the new > Dynamic web project.
- Right-click the project > Properties > Project Facets, I have the following checked:
  • Dynamic Web Module
  • Java
  • Javascript
  • JavaServer Faces (version 1.2)
  • JSTL
  • WebSphere Web (Co-existence)
  • WebSphere Web (Extended)


  • I went under the build path, and added the following jars to my project:
  • commons-beanutils-1.7.0.jar
  • commons-collections-3.2.1.jar
  • commons-digester-1.8.jar
  • commons-lang-2.1.jar
  • commons-logging.jar
  • jsf-api.jar
  • jsf-facelets.jar
  • jsf-impl.jar
  • jstl.jar



  • Here's my web.xml:



    And my faces-config.xml:



    Exception:



    I've done some searching around and I've tried removing the load-on-startup, and made sure I've got all the correct jar files. Anybody know what I'm doing wrong?
     
    J Miller
    Ranch Hand
    Posts: 80
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    So just in case anybody else runs into this, I found what I did wrong. When I added my jars for jsf, I went to the build path and put them in there. I went back and took them out of there, and instead just put them in my "lib" folder. Works like a champ.

    It's always something simple...
     
    Tim Holloway
    Saloon Keeper
    Pie
    Posts: 17620
    39
    Android Eclipse IDE Linux
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Be careful when doing that. WAS has JSF implementation jars built into WebSphere itself and you can get classpath conflicts. Check IBM's documentation for the proper way to build a JSF webapp for WAS.
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic