Wednesday, May 28, 2008

Using Facelets along with JSP in a JSF application

I wanted to use Facelets for some pages in an existing JSP/JSF application.
To achieve this I had to perform the following steps:

  • Download Facelets and copy the jsf-facelets.jar into your WEB-INF/lib directory
    If you use maven you can include the following dependency in your pom:
  • Add the FaceletViewHandler to the faces-config.xml file.
  • Define which pages should be handled by Facelets, i.e. urls ending with '.xhtml'. Add the following snippet to your web.xml:
  • For a useful debug-screen, you should also add the following snippet to your web.xml:
  • 1 comment:

    1. Super!! Thanks very much!! Very good!! God Bless U in Jesus Name!


    Related Posts Plugin for WordPress, Blogger...