E
erenay
Hi all, I'm a newbie in JSP and I'm tring to implement simple example
in http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html
. Despite I did everything in the tutorial, I always get the error (my
project name is 'Proce' and context root is 'proce'):
-----------------------------------------------------------------------------------------------
HTTP Status 404 - /proce/test.jsp
type Status report
message /proce/test.jsp
description The requested resource (/proce/test.jsp) is not available.
-----------------------------------------------------------------------------------------------
When I double click on server tab, it shows that http1.1 port is 8080
But when I choose to run test.jsp on server with the option "Update
context root for Web module proce"
the browser uses "http://localhost:8055/proce/test.jsf"
and the error is: The requested resource (/proce/test.jsf) is not
available.
I can't change it to 8055, it says it is used by another process.
entering "http://localhost:8080/proce/test.jsf" to the browser also
doesn't work
I copied the folder 'proce' from eclipse workspace to C:\Program Files
\apache-tomcat-6.0.14\webapps\, but it didn't help.
My console gives the errors:
-----------------------------------------------------------------------------------------------
INFO: Initializing Sun's JavaServer Faces implementation (1.2_07-b03-
FCS) for context '/proce'
java.lang.ClassCastException:
com.sun.faces.lifecycle.LifecycleFactoryImpl cannot be cast to
javax.faces.lifecycle.LifecycleFactory
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:
1106)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:
766)
...
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener
instance of class com.sun.faces.config.GlassFishConfigureListener
java.lang.ClassCastException:
com.sun.faces.application.ApplicationAssociate cannot be cast to
com.sun.faces.application.ApplicationAssociate
at
com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:
208)
at
com.sun.faces.config.JSFVersionTracker.publishInstanceToApplication(JSFVersionTracker.java:
269)
...
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext start
SEVERE: Context [/proce] startup failed due to previous errors
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext
listenerStop
SEVERE: Exception sending context destroyed event to listener instance
of class com.sun.faces.config.GlassFishConfigureListener
java.lang.ClassCastException:
com.sun.faces.application.ApplicationAssociate cannot be cast to
com.sun.faces.application.ApplicationAssociate
at
com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:
213)
at
com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:
576)
...
14.ªub.2008 20:08:00 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
-----------------------------------------------------------------------------------------------
This is web.xml of the project:
<?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>proce</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<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>
</web-app>
in http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html
. Despite I did everything in the tutorial, I always get the error (my
project name is 'Proce' and context root is 'proce'):
-----------------------------------------------------------------------------------------------
HTTP Status 404 - /proce/test.jsp
type Status report
message /proce/test.jsp
description The requested resource (/proce/test.jsp) is not available.
-----------------------------------------------------------------------------------------------
When I double click on server tab, it shows that http1.1 port is 8080
But when I choose to run test.jsp on server with the option "Update
context root for Web module proce"
the browser uses "http://localhost:8055/proce/test.jsf"
and the error is: The requested resource (/proce/test.jsf) is not
available.
I can't change it to 8055, it says it is used by another process.
entering "http://localhost:8080/proce/test.jsf" to the browser also
doesn't work
I copied the folder 'proce' from eclipse workspace to C:\Program Files
\apache-tomcat-6.0.14\webapps\, but it didn't help.
My console gives the errors:
-----------------------------------------------------------------------------------------------
INFO: Initializing Sun's JavaServer Faces implementation (1.2_07-b03-
FCS) for context '/proce'
java.lang.ClassCastException:
com.sun.faces.lifecycle.LifecycleFactoryImpl cannot be cast to
javax.faces.lifecycle.LifecycleFactory
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:
1106)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:
766)
...
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener
instance of class com.sun.faces.config.GlassFishConfigureListener
java.lang.ClassCastException:
com.sun.faces.application.ApplicationAssociate cannot be cast to
com.sun.faces.application.ApplicationAssociate
at
com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:
208)
at
com.sun.faces.config.JSFVersionTracker.publishInstanceToApplication(JSFVersionTracker.java:
269)
...
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext start
SEVERE: Context [/proce] startup failed due to previous errors
14.ªub.2008 20:08:00 org.apache.catalina.core.StandardContext
listenerStop
SEVERE: Exception sending context destroyed event to listener instance
of class com.sun.faces.config.GlassFishConfigureListener
java.lang.ClassCastException:
com.sun.faces.application.ApplicationAssociate cannot be cast to
com.sun.faces.application.ApplicationAssociate
at
com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:
213)
at
com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:
576)
...
14.ªub.2008 20:08:00 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
-----------------------------------------------------------------------------------------------
This is web.xml of the project:
<?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>proce</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<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>
</web-app>