[jboss-user] [Beginners Corner] - Re: JBoss 4.0.5 and JSF Faces context not found

pKraemer do-not-reply at jboss.com
Tue Apr 10 05:52:22 EDT 2007


Hey,

I tried it again with JBoss Wiki and O'Reilly's JSFExamples and it works fine.

Then I try to run my one application, added the same librarys which are in JSFExamples and used simple MyFaces components.

Now when I add the extension filter I get an error:

anonymous wrote : 
  | 1:45:50,602 ERROR [ContextConfig] Parse error in application web.xml file at jndi:/localhost/ConverterWeb/WEB-INF/web.xml
  | java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name extensionsFilter
  | 	at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2725)
  | 	at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2751)
  | 	at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
  | 	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
  | 

during deployment process.

If I delete the extension Filter project is deployed corret, but when I call the project I get the error:


anonymous wrote : 
  | [STDOUT] 10:32:57,814 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml. 
  | 

That's my web.xml:


  | <?xml version="1.0" encoding="ISO-8859-1"?>
  | 
  | <web-app 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"
  |     version="2.4">
  | 
  |     <context-param>
  |         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |         <param-value>client</param-value>
  |     </context-param>
  |     
  |     <!-- Faces Servlet -->
  |     <servlet>
  |         <servlet-name>FacesServlet</servlet-name>
  |         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  |         <load-on-startup>1</load-on-startup>
  |     </servlet>
  | 
  |     <servlet-mapping>
  |         <servlet-name>FacesServlet</servlet-name>
  |         <url-pattern>*.faces</url-pattern>
  |     </servlet-mapping>
  | 
  | 	<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>
  | 
  |  <listener>
  |    	 <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  |    </listener>
  | 
  | 	<ejb-ref>
  | 		<ejb-ref-name>ejb/ConverterRemote</ejb-ref-name>
  | 		<ejb-ref-type>Session</ejb-ref-type>
  | 		<home>java.lang.Object</home>
  | 		<remote>converter.ConverterRemote</remote>
  | 	</ejb-ref>
  | 
  | </web-app>
  | 

and my simple index.jsp


  | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  | <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
  | <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%>
  | <f:view>
  | 
  | <x:document> 
  | 	<x:documentHead>
  | 	
  | 	</x:documentHead>
  | 		<h:outputText value="Hallo"/>
  | 	<x:documentBody>
  | 	
  | 	</x:documentBody>
  | </x:document>
  | </f:view>
  | 

I need your help please

Thx

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035905#4035905

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035905



More information about the jboss-user mailing list