No, It is Immpossible. Facelets is not quite a template structure, but a completely different viewing technology and basically the successor to JSP. You can use them together in the same project when used separately, but you cannot use Facelets tags inside JSP files. Facelets is not a JSP tag library, but a single view technology like JSP. For example, Sitemesh is not a submission technology, but a JSP tag library that can be imported and used in JSP using <%@taglib%> .
If you want to use Facelets, you must completely replace the JSP files. Facelets can also be used without any necessary JSF managed beans, if you only have static views. Actually, this does not mean that you type too much code that you really need. So JSF being redundant is not an argument. All you have to do is put one javax-faces.jar file in /WEB-INF/lib . JSF 2.1 will automatically register in the servlet 3.0 container. You only need to declare the FacesServlet explicitly in web.xml whenever you want to use the *.xhtml URL *.xhtml (default patterns: /faces/* , *.faces and *.jsf ).
source share