MyEclipse Logo

Using Facelets with JSF 1.2/Tomcat

Notice: This document only applies to developers who are trying to use Facelets with JSF 1.2 and Tomcat. 

There is an issue that has been identified with Facelets application development when using JSF 1.2 RI and some versions of Tomcat.  More Information regarding this issue can been obtained from the following blog entry: http://jroller.com/page/RickHigh?entry=trying_to_get_jsf_1

The problem resolves around hot deployment in Tomcat and the configure listeners in the JSF implementation.  These issues are being fixed in the latest Tomcat 6.x and Tomcat 5.5.x. 

Cagatay Civici in a response to Rick Hightower's original blog post explained it further: 
"It seems to be a listener issue. Listener is possibly configured in a tld inside jsf-impl.jar and Tomcat 5.5.20 can't extract that info. Configuring the listener inside web.xml should solve it. "

To workaround this issue, add the following listeners to end of your project's web.xml.  Note: Only add these listeners if you are using JSF 1.2 RI implementation.

web.xml modification
<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>


<!-- Listener implementation to handle web application lifecycle events -->
<listener>
<listener-class>
com.sun.faces.application.WebappLifecycleListener
</listener-class>
</listener>

If you have any further problems please visit the MyEclipse Support Forums.