File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Using tomcat 7 jdk 1.6.0.21 and eclipes getting 404-/MyApp01/ resource not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Using tomcat 7 jdk 1.6.0.21 and eclipes getting 404-/MyApp01/ resource not found" Watch "Using tomcat 7 jdk 1.6.0.21 and eclipes getting 404-/MyApp01/ resource not found" New topic
Author

Using tomcat 7 jdk 1.6.0.21 and eclipes getting 404-/MyApp01/ resource not found

Bruce Schmid
Greenhorn

Joined: Apr 06, 2009
Posts: 5
Getting HTTP 404 - /MyApp01/ I have cleaned and then build the project but when I run it within eclipes I get a 404-. My application is to just display the welcome jsp from the web.xml file (Product.jsp). Tomcat was running and it looks like I didn't get any errors.

I am new to eclipes and tomcat

Any help will be appreciated
Bruce

eclipes helios

jdk 1.6.21
tomcat:Tomcat v7.0 Server at localhost
configuration path :/Servers/Tomcat v7.0 Server at localhost-config
use workspace metadata :.metadata\.plugins\org.eclipse.wst.server.core\tmp0

web-app_3_0.xsd


XML file
<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_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>MyApp01</display-name>
<security-constraint>
<web-resource-collection>
<web-resource-name>JSPs</web-resource-name>
<url-pattern>/jsp/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<welcome-file-list>
<welcome-file>Product.jsp</welcome-file>
</welcome-file-list>
</web-app>

my console display

Sep 20, 2010 3:08:41 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;c:\Program Files\java\jdk1.6.21\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sep 20, 2010 3:08:41 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MyApp01' did not find a matching property.
Sep 20, 2010 3:08:41 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 546 ms
Sep 20, 2010 3:08:41 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 20, 2010 3:08:41 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
Sep 20, 2010 3:08:41 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Sep 20, 2010 3:08:41 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Sep 20, 2010 3:08:41 PM org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Sep 20, 2010 3:08:41 PM org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Sep 20, 2010 3:08:41 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 364 ms
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Do you have the context path set up properly in Eclipse? (I usually default to "/", so I don't actually recall how to set it.)
Bruce Schmid
Greenhorn

Joined: Apr 06, 2009
Posts: 5
I changed the context path from root to "/"
Restarted eclipes and tomcat and still getting 404-

I also came accross info on this problem
from http://dev.eclipse.org/newslists/news.eclipse.webtools/msg09757.html

"Because of a bug in the Property editor (Project Properties->J2EE) where you can't set an empty context root, you'll have to edit .settings/.component and remove the value _completely_ for the context-root property so that it looks like
<property name="context-root"/>

You can set the META-INF/context.xml's <Context> path attribute to "/", too.
This should help. Don't ever set your path to "ROOT"."

In the console I am getting this warning: Sep 21, 2010 2:17:50 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MyApp01' did not find


I could not find the content.xml under META-INF?

Thank you for bringing this problem up

Is there anything else I should look at?
Bruce
lokesh devineni
Greenhorn

Joined: Oct 19, 2010
Posts: 5

hi to all,
actually i am also getting same message in the browser.

HTTP Status 404 -

--------------------------------------------------------------------------------

type Status report

message

description The requested resource () is not available.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.29

anyone can you help me exact answer

logs we hava like this

org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'medInfoDataSource' defined in class path resource [dao/config/hibernate/medinfo-hibernate-cfg.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name com.biogenidec.medinfo is not bound in this Context

Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name com.biogenidec.medinfo is not bound in this Context

can you tell what is exact error
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using tomcat 7 jdk 1.6.0.21 and eclipes getting 404-/MyApp01/ resource not found
 
Similar Threads
problem with tomcat setup in Eclipse
shutdown failed Tomcat in netbeans6.1
org.apache.catalina.core.AprLifecycleListener was not found
Why NestedServletException?
moving project from Websphere Server v6.1 to Tomcat v5.5