Setting up a simple facelets application

My question is, how do I set up IntelliJ to work with JSF and Facelets?

I downloaded the current facelets binaries, version 1.0.14. Then I created a web module without specifying any sort of support for JSF. The facelets distrubution came with jsf jars and a host of others, so I created a project library called Facelet Jars and included everything in the lib folder of the facelets distribution, minus the jsp-api which Tomcat already has.

By the way, I'm using Tomcat 5.5.

Using the tutorial included with facelets, I set up the numberguess, which defines a template and has a couple of jsp pages, a managed bean and a few other odds and ends.

When I run it, I see this: INFO: FacesELResolvers not registered with Jsp. And then there is an exception, a NullPointerException that looks like this:

WARNING: phase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@e7eec9) threw exception: java.lang.NullPointerException null
com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
javax.faces.webapp.FacesServlet.service(Unknown Source)


It goes on of course.

My question is really more than one question potentially. How do I set up IntelliJ to work with Tomcat 5.5 and Facelets? I've run through several JSF and Facelet tutorials, but always there is a stumbling block that kills the process. Googling helps to get me through some things, but I can't find much on how to make it work in IntelliJ. I'm being pushed towards NetBeans or some such, but I'm here in IntelliJ to stay.

By the way, I have the most recent IntelliJ to date: 6.05 build 6180.

Any help would be greatly appreciated!

1 comment
Comment actions Permalink

This is kind of a roundabout way of finding my answer, but allow me to explain for anyone that might run into this in the future.

I downloaded the binary distribution of Facelets and found a readme that told me how to build from, so I signed up and downloaded the source, copied servet-api.jar from Tomcat 5.5 and jsf-api.jar from the 1.2 binary distribution, put those in a folder called lib in the root build folder, made changes to the to indicate my user name, then executed ant. It populated that lib folder with all the jars I needed for my project.

Then the example came up without a hitch.


Please sign in to leave a comment.