2 Replies Latest reply on Oct 8, 2007 10:55 AM by razmaspaz

    JSF COnfiguration

    razmaspaz

      I am attepting to use JSF on JBoss 4.2 It seems like it should be setup to go already. I am stuck getting this exception:

      java.lang.RuntimeException: Cannot find FacesContext
      javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1796)
      javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1613)
      org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:92)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      I found some info about adding a listener for MyFaces, but it looks like the RI is the default implementation for JBoss 4.2. So is there something Else I need to do to initialize the faces context?

      Thanks
      Razmaspaz

        • 1. Re: JSF COnfiguration
          raist_majere

          You can find a minimal config example here, and info for JBoss4.2 and JSF here. To use MyFaces components, here says there's no problem, and also there's some help if you want to use MyFaces Core JSF implementation.

          Also there's a note here saying:

          If you don't remove the JSF RI libraries from your WEB-INF/lib then you might get strange errors like No faces context?!


          • 2. Re: JSF COnfiguration
            razmaspaz

            Thanks for the resources. It helped me figure out my problem. Turns out I was requesting the jsp directly, instead of asking for the .faces URL.