• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF/MyFaces and Sitemesh

 
Mathias Berg
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, im having problem with JSF code in my sitemesh decorator files. i get this error if im putting in some JSF code, like <f:view> ... </f:view> in my default decorator file. It works fine in my other JSP files (Those that displays through the <decorator:body/> tag)

------------------------------------------------------------
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 -element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.
at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:926)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:313)
at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:73)
at org.apache.jsp.decorators.default_jsp._jspx_meth_f_005fview_005f0(default_jsp.java:341)
at org.apache.jsp.decorators.default_jsp._jspService(default_jsp.java:167)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(Servlet.java:803)

----------------------------------------------------------------------------

Anyone got this problem, solved it also maybe :-)

My env is:

Tomcat 5.5 / Servlet 2.4.
myfaces, 1.1.5
sitemesh, 2.2.1
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic