JSF 404 Error
Hello,
I have googled a long time, but I couldn't find a solution to my problem.
I am developing my first JSF 1.2 Application in combination with Tomcat 6 with Eclipse.
I have imported all libraries needed (jsf_api, jsf_impl, jstl etc.). When I call a JSF page, I get a 404 resource not found error.
Normal JSP projects work perfectly.
These are the contents of my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>test</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Basically I followed this tutorial to set up my first jsf app: http://www.eclipse.org/webtools/jsf/dev_resource/JSFTutorial-RC3/JSFTools_tutorial.html .
There are two versions, one with JSF 1.1 support which worked, and one with JSF 1.2 support which didn't work.
Thanks in advance,
Tobias
Message was edited by:
tobiasgp
[1898 byte] By [
tobiasgpa] at [2007-11-27 11:05:48]

# 4
I have found the following error messages in Tomcat's console output:
INFO: Initializing Sun's JavaServer Faces implementation (1.2-b20-FCS) for context '/test'
19.07.2007 18:38:40 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Completed initializing Sun's JavaServer Faces implementation (1.2-b20-FCS) for context '/test'
19.07.2007 18:38:40 org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class com.sun.faces.config.GlassFishConfigureListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.ajax4jsf.framework.DebugLifecycleFactory.<clinit>(DebugLifecycleFactory.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:567)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:460)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1106)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
at com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
19.07.2007 18:38:40 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error listenerStart
19.07.2007 18:38:40 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/test] startup failed due to previous errors
SCHWERWIEGEND = Fatal ;-)
I have just removed AJAX4JSF and it works! How shall I go on if I would like to use it?
Message was edited by:
tobiasgp
Message was edited by:
tobiasgp