1 2 Previous Next 18 Replies Latest reply on Jul 20, 2006 9:49 AM by rfidler1978

    ERROR [javax.faces.webapp.UIComponentTag] Faces context not

    ASHISH TANDON Newbie

      hi all,
      I am using the jboss-4.0.3.SP1 & jsf. while runing the application its gives the following error.

      2005-11-30 11:47:28,952 ERROR [javax.faces.webapp.UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
      2005-11-30 11:47:28,983 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SubscriberManagementNew].[jsp]] Servlet.service() for servlet jsp threw exception
      java.lang.NullPointerException
      at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
      at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
      at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
      at org.apache.jsp.AddSubscriber_jsp._jspx_meth_f_view_0(org.apache.jsp.AddSubscriber_jsp:97)
      at org.apache.jsp.AddSubscriber_jsp._jspService(org.apache.jsp.AddSubscriber_jsp:72)
      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:322)
      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      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 org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
      at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:48)
      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.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:595)
      2005-11-30 11:47:28,983 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SubscriberManagementNew].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.lang.NullPointerException
      at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
      at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
      at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
      at org.apache.jsp.AddSubscriber_jsp._jspx_meth_f_view_0(org.apache.jsp.AddSubscriber_jsp:97)
      at org.apache.jsp.AddSubscriber_jsp._jspService(org.apache.jsp.AddSubscriber_jsp:72)
      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:322)
      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      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 org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
      at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:48)
      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.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:595)
      2005-11-30 11:47:28,983 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SubscriberManagementNew].[jsp]] Servlet.service() for servlet jsp threw exception
      java.lang.NullPointerException
      at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
      at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
      at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
      at org.apache.jsp.AddSubscriber_jsp._jspx_meth_f_view_0(org.apache.jsp.AddSubscriber_jsp:97)
      at org.apache.jsp.AddSubscriber_jsp._jspService(org.apache.jsp.AddSubscriber_jsp:72)
      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:322)
      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      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 org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
      at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:48)
      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.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:595)

      can some one help me.

      my web.xml file is

      <?xml version='1.0' encoding='UTF-8'?>

      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

      <web-app>
      <display-name> Subscriber Management Application </display-name>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
      </context-param>

      <context-param>
      <param-name>com.sun.faces.validateXml</param-name>
      <param-value>true</param-value>
      Set this flag to true if you want the JSF Reference Implementation to validate the XML in your faces-config.xml resources against the DTD. Default value is false.

      </context-param>

      <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>true</param-value>
      Set this flag to true if you want the JSF Reference Implementation to verify that all of the application objects you have configured (components, converters,renderers, and validators) can be sccessfully created. Default value is false.

      </context-param>


      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>


      <!-- Faces Servlet -->

      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>



      <servlet-name>SpringContextServlet</servlet-name>
      <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
      <load-on-startup>1</load-on-startup>


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

      </web-app>

      pls some help me ASAP
      Thanks in advance.

        • 1. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
          Aaron Novice

          I am also having this issue, with several of my JSF apps. DVD and Seam Trailblazers work fine, but none of my JSF apps work. Keep getting a null pointer exception, including apps built using Java Studio Creator 2004Q2

          Any help would be great!

          • 3. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
            Ram Mohan Kumar Newbie

            I had the same error. But I could get out of it by replacing the taglib definitions.

            I replaced the below lines
            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
            <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

            with the JBoss supplied tag libraries that were copied to my WEB-INF directory.
            <%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h" %>
            <%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f" %>

            The error may be caused by some un-intended version issues between these two file sets.

            Best of luck!!

            • 4. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
              jianqiang jiang Newbie

              my env is eclipse +tomcat5.0,i find this same problem in this afternoon
              ,now i think it is jsf' bug , it now allow input http://localhost:8080/jsfselect/home.jsp, must forward this page from other page , for example index.jsp
              index.jsp content:





              <jsp:forward page="/jsfselect/home.jsp" />


              home.jsp content:


              <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

              <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

              <f:view>
              </f:view>


              if not this ,then occer problem :Faces context not
              found.
              may this is jsf's disadvantage
              i think it become mature in future

              • 5. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                Ken Mansour Newbie

                Thanks for the tip. This also worked for me under JBoss 4.0.3sp1. It appears that JSF needs the redirect to properly load the Faces Context. Not a big problem, but one that needs to be reported better.

                • 6. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                  John Najarian Newbie

                  I am having the same problem using netbeans 5.0 & jboss-4.0.3.SP1. I tried the solutions above, bu maybe I did something wrong.

                  My web.xml & faces-config.xml are:
                  <?xml version="1.0" encoding="UTF-8"?>
                  <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

                  <context-param>
                  <param-name>com.sun.faces.enableHtmlTagLibValidator</param-name>
                  <param-value>true</param-value>
                  </context-param>
                  <context-param>
                  <param-name>javax.faces.CONFIG_FILES</param-name>
                  <param-value>/WEB-INF/faces-config.xml</param-value>
                  </context-param>
                  <context-param>
                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                  <param-value>client</param-value>
                  </context-param>
                  <context-param>
                  <param-name>com.sun.faces.validateXml</param-name>
                  <param-value>true</param-value>
                  </context-param>
                  <context-param>
                  <param-name>com.sun.faces.verifyObjects</param-name>
                  <param-value>true</param-value>
                  </context-param>

                  <listener-class>com.sun.faces.config.ConfigureListener</listener-class>


                  <servlet-name>Faces Servlet</servlet-name>
                  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                  <load-on-startup>1</load-on-startup>

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

                  <welcome-file-list>
                  <welcome-file>login.jsp</welcome-file>
                  </welcome-file-list>
                  </web-app>
                  --------------------
                  <?xml version='1.0' encoding='UTF-8'?>


                  <!DOCTYPE faces-config PUBLIC
                  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

                  <!-- =========== FULL CONFIGURATION FILE ================================== -->

                  <faces-config>
                  <navigation-rule>
                  <from-view-id>/login.jsp</from-view-id>
                  <navigation-case>
                  <from-outcome>success</from-outcome>
                  <to-view-id>/greeting.jsp</to-view-id>
                  </navigation-case>
                  <navigation-case>
                  <from-outcome>failure</from-outcome>
                  <to-view-id>/login.jsp</to-view-id>
                  </navigation-case>
                  </navigation-rule>

                  <managed-bean>
                  Login Bean Holder
                  <managed-bean-name>LoginBean</managed-bean-name>
                  <managed-bean-class>jsflogin.LoginBean</managed-bean-class>
                  <managed-bean-scope>session</managed-bean-scope>
                  </managed-bean>
                  </faces-config>
                  --------------------------------
                  The error from the JBoss output in NetBeans is:
                  16:57:26,612 INFO [ConfigureListener] Application object verification completed successfully
                  16:57:28,721 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
                  16:57:28,721 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                  java.lang.NullPointerException
                  at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:61 at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:21 at org.apache.jsp.login_jsp._jspx_meth_h_form_0(org.apache.jsp.login_jsp:10 at org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:8 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:9 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:32 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:31 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:26 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:25 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:67 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:46 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:39 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:30 at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:69 at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:66 at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:5 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:9 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:32 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:31 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:26 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:25 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:8 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:20 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:21 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:17 at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:3 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:15 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:5 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:14 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:74 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:52 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:11 at java.lang.Thread.run(Thread.java:5916:57:29,049 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                  java.lang.NullPointerException
                  at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:61 at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:21 at org.apache.jsp.login_jsp._jspx_meth_h_form_0(org.apache.jsp.login_jsp:10 at org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:8 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:9 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:32 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:31 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:26 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:25 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:67 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:46 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:39 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:30 at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:69 at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:66 at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:5 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:9 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:32 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:31 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:26 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:25 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:8 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:20 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:21 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:17 at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:3 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:15 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:5 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:14 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:74 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:52 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:11 at java.lang.Thread.run(Thread.java:5916:57:29,330 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
                  16:57:30,330 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.

                  Any and all help is apprecciated.

                  • 7. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                    Gustav Rånby Newbie

                    If I create and deploy a JSF-web project with the wizard in netbeans5rc2 I get a nullpointer exception when I click the link on the start-page.

                    I havent figured out why you get a nullpointer exception but I did this:

                    1) In the library manager I created a new library "JbossJSF" with the JSF library files from the JBoss4.0.3sp1 installation.

                    2) I exchanged the JSF library included by the wizard with the newly created one.

                    Now the JSF .jar files from the Jboss-installation get included in the .war file and I dont get the nullpointer exception.

                    • 8. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                      Sadha Moodley Newbie

                      Hi, does anyone know how to fix this problem for projects created in java studio creator 2,

                      Here is the xml file created
                      <?xml version="1.0" encoding="UTF-8"?>
                      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
                      <context-param>
                      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                      <param-value>server</param-value>
                      </context-param>
                      <context-param>
                      <param-name>javax.faces.CONFIG_FILES</param-name>
                      <param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value>
                      </context-param>
                      <context-param>
                      <param-name>com.sun.faces.validateXml</param-name>
                      <param-value>true</param-value>
                      </context-param>
                      <context-param>
                      <param-name>com.sun.faces.verifyObjects</param-name>
                      <param-value>false</param-value>
                      </context-param>

                      <filter-name>UploadFilter</filter-name>
                      <filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class>
                      <init-param>

                      The maximum allowed upload size in bytes. If this is set
                      to a negative value, there is no maximum. The default
                      value is 1000000.

                      <param-name>maxSize</param-name>
                      <param-value>1000000</param-value>
                      </init-param>
                      <init-param>

                      The size (in bytes) of an uploaded file which, if it is
                      exceeded, will cause the file to be written directly to
                      disk instead of stored in memory. Files smaller than or
                      equal to this size will be stored in memory. The default
                      value is 4096.

                      <param-name>sizeThreshold</param-name>
                      <param-value>4096</param-value>
                      </init-param>

                      <filter-mapping>
                      <filter-name>UploadFilter</filter-name>
                      <servlet-name>Faces Servlet</servlet-name>
                      </filter-mapping>

                      <servlet-name>Faces Servlet</servlet-name>
                      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                      <load-on-startup>1</load-on-startup>


                      <servlet-name>ThemeServlet</servlet-name>
                      <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class>

                      <servlet-mapping>
                      <servlet-name>Faces Servlet</servlet-name>
                      <url-pattern>/faces/*</url-pattern>
                      </servlet-mapping>
                      <servlet-mapping>
                      <servlet-name>ThemeServlet</servlet-name>
                      <url-pattern>/theme/*</url-pattern>
                      </servlet-mapping>
                      <welcome-file-list>
                      <welcome-file>faces/Page1.jsp</welcome-file>
                      </welcome-file-list>
                      <jsp-config>
                      <jsp-property-group>
                      <url-pattern>*.jspf</url-pattern>
                      <is-xml>true</is-xml>
                      </jsp-property-group>
                      </jsp-config>
                      </web-app>

                      • 9. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                        Paul Hu Newbie

                        It is a bug with Jboss4.0.3SP1, instead of with JSF and anything else.

                        I tested the exact same application in both Jboss4.0.2 and Jboss4.0.3SP1, it worked very well in Jboss4.0.2. same problem as above with Jboss4.0.3SP1

                        • 10. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                          Daniel Hinojosa Master

                          I believe this problem occurs because JBoss4.0.3 not comes packaged with myFaces and we have a collision

                          http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossFaces

                          I am going to give this a try and post the solution.

                          • 12. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                            Bhanu K Newbie

                            I am reading through this post and cannot find a solution

                            http://wiki.jboss.org/wiki/Wiki.jsp?page=JbossFaces does not exist.

                            I still have this problem trying to Invoke Faces Servlet. Please help! Thanks a bunch!

                            This is my web.xml

                            <context-param>
                            <param-name>javax.faces.CONFIG_FILES</param-name>
                            <param-value>/WEB-INF/faces-config.xml</param-value>
                            </context-param>

                            <context-param>
                            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                            <param-value>client</param-value>
                            </context-param>



                            <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


                            <servlet-name>Faces Servlet</servlet-name>
                            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                            <load-on-startup>11</load-on-startup>

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


                            <servlet-name>TilesServet</servlet-name>
                            <servlet-class>
                            org.apache.struts.tiles.TilesServlet
                            </servlet-class>
                            <init-param>
                            <param-name>definitions-config</param-name>
                            <param-value>/WEB-INF/tiles-defs.xml</param-value>
                            </init-param>
                            <init-param>
                            <param-name>definitions-parser-validate</param-name>
                            <param-value>true</param-value>
                            </init-param>
                            <load-on-startup>12</load-on-startup>



                            • 13. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                              Daniel Hinojosa Master

                              http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossFaces

                              capital B, sorry

                              "bhanuk" wrote:
                              I am reading through this post and cannot find a solution

                              http://wiki.jboss.org/wiki/Wiki.jsp?page=JbossFaces does not exist.

                              I still have this problem trying to Invoke Faces Servlet. Please help! Thanks a bunch!

                              This is my web.xml

                              <context-param>
                              <param-name>javax.faces.CONFIG_FILES</param-name>
                              <param-value>/WEB-INF/faces-config.xml</param-value>
                              </context-param>

                              <context-param>
                              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                              <param-value>client</param-value>
                              </context-param>


                              <listener>
                              <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                              </listener>
                              <servlet>
                              <servlet-name>Faces Servlet</servlet-name>
                              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                              <load-on-startup>11</load-on-startup>
                              </servlet>
                              <servlet-mapping>
                              <servlet-name>Faces Servlet</servlet-name>
                              <url-pattern>*.faces</url-pattern>
                              </servlet-mapping>

                              <servlet>
                              <servlet-name>TilesServet</servlet-name>
                              <servlet-class>
                              org.apache.struts.tiles.TilesServlet
                              </servlet-class>
                              <init-param>
                              <param-name>definitions-config</param-name>
                              <param-value>/WEB-INF/tiles-defs.xml</param-value>
                              </init-param>
                              <init-param>
                              <param-name>definitions-parser-validate</param-name>
                              <param-value>true</param-value>
                              </init-param>
                              <load-on-startup>12</load-on-startup>
                              </servlet>




                              • 14. Re: ERROR [javax.faces.webapp.UIComponentTag] Faces context
                                smichea Newbie

                                I don't know if this is a similar case for you, but I exactly obtained this error when I accessed my JSF page through a link where I forgot to add the "/faces/" pattern defined in the web.xml file:

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

                                Hope this will help.

                                1 2 Previous Next