This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JSF and the fly likes New JSF project getting javax.faces.context.FacesContextFactory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "New JSF project getting javax.faces.context.FacesContextFactory" Watch "New JSF project getting javax.faces.context.FacesContextFactory" New topic
Author

New JSF project getting javax.faces.context.FacesContextFactory

J Miller
Ranch Hand

Joined: Oct 21, 2010
Posts: 74
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

    Joined: Oct 21, 2010
    Posts: 74
    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

    Joined: Jun 25, 2001
    Posts: 17046
        
      26

    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.


    An IDE is no substitute for an Intelligent Developer.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: New JSF project getting javax.faces.context.FacesContextFactory
     
    It's not a secret anymore!