Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2008

Tip: Looking for answers? Try searching our database.

JSP-Eclipse-Tomcat Setup Problem - The requested resource is not     available

Thread view: 
erenay - 14 Feb 2008 20:24 GMT
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>
---------------------------------------------------------------------------------------------------

Please help me! As I said, I did everything step-by-step in the
tutorial.
erenay - 15 Feb 2008 10:16 GMT
Anybody has an idea?
erenay - 15 Feb 2008 14:11 GMT
> Anybody has an idea?

The problem is fixed.
My jsf-api and jsf-impl jar files were in C:\Program Files\apache-
tomcat-6.0.14\lib, but it was not the path I declared in my
preferances.
Moving them from the Tomcat directory fixed the problem.
Taoyi - 16 Feb 2008 13:16 GMT
It seems that you improperly close the eclipse without stop the tomcat
service. You can run shutdown.bat in your tomcat/bin folder. If it can
not work, you try to kill all java process in your system.
Lew - 16 Feb 2008 16:14 GMT
> It seems that you improperly close the eclipse without stop the tomcat
> service. You can run shutdown.bat in your tomcat/bin folder. If it can
> not work, you try to kill all java process in your system.

When you run Tomcat from inside NetBeans and close NetBeans, NB is kind enough
to close Tomcat for you as part of its shutdown.

Perhaps Eclipse has a similar feature?

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.