I was having the same Faces Context problem with JSF apps developed on NetBeans 5.0 and deployed to JBoss-4.0.3SP1. Even after moving to JBoss-4.0.2, I still see the same problem. Was anyone ever able to resolve this problem?

Ok, if I'm not missing something, I have the same problem when trying to use JSF tags:

root cause

13:14:44,918 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.13:14:44,921 ERROR [[mainJsp]] Servlet.service() for servlet mainJsp threw exceptionjava.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.jsp.main_jsp._jspx_meth_f_view_0(org.apache.jsp.jsp.main_jsp:161) at org.apache.jsp.jsp.main_jsp._jspService(org.apache.jsp.jsp.main_jsp:118) 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)

java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:921) at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:578) at org.apache.tomcat.util.digester.Rule.end(Rule.java:228) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown S

I was receiving the same error when moving a webapp from Tomcat standalone to JBoss 4.0.4 GA. When looking at the existing web.xml I noticed that some properties that were set using net.sourceforge.myfaces. Recalling from some JBoss JSF documentation that the default JSF implementation was provided by Apache, I looked into which library Tomcat (embedded) was using - and behold it was Apache's implementation.

Now I would think that having the net.sourceforge implementation in my WEB-INF would prompt Tomcat to use that impl, but it didn't. When I replaced the default Apache impl with the net.sourceforge everything was fine.