2 Replies Latest reply on Feb 7, 2007 7:04 AM by Daniel Murygin

    JSF question

    Laszlo Graf Newbie

      Hi all
      I have a web app wich runs on jboss-4.0.4.GA; it uses JSF and EJB3.
      In web.xml the I have the following settings:

      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>index.jsf</welcome-file>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      </welcome-file-list>

      and

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>

      OK. It works fine when I access a JSP file from the root of my app
      like /myapp/index.jsp or when I access a JSP from /myapp/subfolder/index.jsp or by accessing /myapp/.

      But for /myapp/subfolder/ it complains that 'No faces context?!'

      Any suggestion?
      --
      Laci



        • 1. Re: JSF question
          Daniel Murygin Newbie

          I have the same problem. I am using Jsf Implemantation from SUN, version is 1.1_02.

          Same war file works fine with Tomcat 5.5 standalone.

          Exception in der JBoss log is:

          2007-02-07 12:04:10,378 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/beleg-web-0.9-SNAPSHOT].[jsp]] Servlet.service() for servlet jsp threw exception
          javax.servlet.jsp.JspException: No faces context?!
           at org.apache.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.java:74)
           at org.apache.jsp.login.login_jsp._jspx_meth_f_loadBundle_0(org.apache.jsp.login.login_jsp:125)
           at org.apache.jsp.login.login_jsp._jspService(org.apache.jsp.login.login_jsp:86)
           at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
           at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
           at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
           at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
           at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Thread.java:534)
          


          • 2. Re: JSF question
            Daniel Murygin Newbie

            I found a solution in the end of this page:
            http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html

            1. Delete directory JBOSS_HOME/server/CONF/jbossweb-tomcat55.sar/jsf-libs
            2. Stop JBoss
            3. Delete directories [jboss_home>/server//data,../tmp,../work
            4. Start JBoss

            I am usiong JBoss-4.0.3.