|
Hi all, I'm tying to get the simple car data table example to work so I can hopefully figure out why my data table sorting isn't working in my other project, but I'm getting a strange error when I try to run it. Dec 31, 2005 11:43:43 AM javax.faces.webapp.UIComponentTag setupResponseWriter SEVERE: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml. Here's my Web.xml: <?xml version="1.0"?> <!-- * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --> <!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> <!-- This web.xml can be used during debugging, when there is no myfaces.jar library available. The faces-config.xml file (that is normally in the myfaces.jar) must be copied to the /WEB-INF directory of the web context. The TLDs (that are normally in the myfaces.jar) must be copied to the /WEB-INF/lib directory of the web context.--> <description>debug web.xml</description> <context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value> /WEB-INF/faces-config.xml </param-value> <description> Comma separated list of URIs of (additional) faces config files. (e.g. /WEB-INF/my-config.xml) See JSF 1.0 PRD2, 10.3.2 </description> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> <description> State saving method: "client" or "server" (= default) See JSF Specification 2.5.2 </description> </context-param> <context-param> <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> <param-value>true</param-value> <description> This parameter tells MyFaces if _javascript_ code should be allowed in the rendered HTML output. If _javascript_ is allowed, command_link anchors will have _javascript_ code that submits the corresponding form. If _javascript_ is not allowed, the state saving info and nested parameters will be added as url parameters. Default: "true" </description> </context-param> <context-param> <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.PRETTY_HTML</param-name> <param-value>true</param-value> <description> If true, rendered HTML code will be formatted, so that it is "human readable". i.e. additional line separators and whitespace will be written, that do not influence the HTML code. Default: "true" </description> </context-param> <context-param> <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> <param-value>true</param-value> <description> If true, a _javascript_ function will be rendered that is able to restore the former vertical scroll on every request. Convenient feature if you have pages with long lists and you do not want the browser page to always jump to the top if you trigger a link or button action that stays on the same page. Default: "false" </description> </context-param> <!-- WelcomeFile Filter --> <!-- <filter> <filter-name>WelcomeFile Filter</filter-name> <filter-class>org.apache.myfaces.webapp.filter.WelcomeFileFilter</filter-class> <description> Due to the manner in which the JSP / servlet lifecycle functions, it is not currently possible to specify default welcome files for a web application and map them to the MyFacesServlet. Normally they will be mapped to the default servlet for the JSP container. To offset this shortcoming, we utilize a servlet Filter which examines the URI of all incoming requests. </description> </filter> --> <!-- Extensions Filter --> <filter> <filter-name>extensionsFilter</filter-name> <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class> <init-param> <param-name>uploadMaxFileSize</param-name> <param-value>100m</param-value> <description>Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description> </init-param> <init-param> <param-name>uploadThresholdSize</param-name> <param-value>100k</param-value> <description>Set the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description> </init-param> <!-- <init-param> <param-name>uploadRepositoryPath</param-name> <param-value>/temp</param-value> <description>Set the path where the intermediary files will be stored. </description> </init-param>--> </filter> <filter-mapping> <filter-name>extensionsFilter</filter-name> <url-pattern>*.jsf</url-pattern> </filter-mapping> <filter-mapping> <filter-name>extensionsFilter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <!-- Faces Servlet --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- Faces Servlet Mapping --> <!-- virtual path mapping --> <!-- <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> --> <!-- extension mapping --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> </web-app> I'm trying to run this by entering this in the URL: http://localhost:8080/Car/sortTable.jsp, but get these logged errors: 2005-12-31 11:52:49 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-12-31 11:52:49 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2005-12-31 11:52:49 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2005-12-31 11:52:49 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2005-12-31 11:53:03 StandardWrapperValve[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 com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105) at org.apache.jsp.sortTable_jsp._jspx_meth_f_view_0(sortTable_jsp.java:129) at org.apache.jsp.sortTable_jsp._jspService(sortTable_jsp.java:103) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) (I have the project deployed to Webapp called "Car") I can send the project source in an attachment (the deployed code) if that would help. Mike |
- Trying to get the source car sort (data table) example to wo... Mike

