I'm trying to use sitmesh with JSF and am getting the following exception: This is my template decorator page and has a f:view page. Is there something I have to do with this to initialize the FacesContext for the decorators/templates?
javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to *.jsf (with the <servlet-mapping>-element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message. javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:926) javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:313) org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:73) org.apache.jsp.decorators.andreasTemplate_jsp._jspx_meth_f_view_0(andreasTemplate_jsp.java:146) org.apache.jsp.decorators.andreasTemplate_jsp._jspService(andreasTemplate_jsp.java:122) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.age.j.soft.sitemesh.TemplateFilterImpl.applyDecorator(TemplateFilterImpl.java:49) com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)