[eclipse] TOMCAT - HTTP Status 404

I set up my server in eclipse and when I run it the console prints:

mai 02, 2013 4:05:13 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\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files (x86)\Microsoft Application Virtualization Client;c:\Program Files (x86)\Open Text\View\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Java\jre7\bin;C:\WorkspacePPL\apache-maven-3.0.4\bin;.
mai 02, 2013 4:05:13 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ppl-webapp' did not find a matching property.
mai 02, 2013 4:05:13 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
mai 02, 2013 4:05:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 604 ms
mai 02, 2013 4:05:14 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
mai 02, 2013 4:05:14 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
mai 02, 2013 4:05:14 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
mai 02, 2013 4:05:14 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
mai 02, 2013 4:05:14 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/22  config=null
mai 02, 2013 4:05:14 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 493 ms

but then, if I browse http://localhost:8080 I get:

HTTP Status 404 - /
---------------------------------------------------------------------
type Status report
message /
description The requested resource is not available.

While I should see the Tomcat welcome page.

If I run Tomcat outside of eclipse I can reach the welcome page.

This question is related to eclipse tomcat http-status-code-404

The answer is


You don't have to use Tomcat installation as a server location. It is much easier just to copy the files in the ROOT folder.

Eclipse forgets to copy the default apps (ROOT, examples, etc.) when it creates a Tomcat folder inside the Eclipse workspace. Go to C:\apache-tomcat-7.0.8\webapps, R-click on the ROOT folder and copy it. Then go to your Eclipse workspace, go to the .metadata folder, and search for "wtpwebapps". You should find something like your-eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps (or ../tmp1/wtpwebapps if you already had another server registered in Eclipse). Go to the wtpwebapps folder, R-click, and paste ROOT (say "yes" if asked if you want to merge/replace folders/files). Then reload http://localhost/ to see the Tomcat welcome page.

Source: HTTP Status 404 error in tomcat


To get your program to run, please put jsp files under web-content and not under WEB-INF because in Eclipse the files are not accessed there by the server, so try starting the server and browsing to URL:

http://localhost:8080/YourProject/yourfile.jsp

then your problem will be solved.


Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to tomcat

Jersey stopped working with InjectionManagerFactory not found The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat Spring boot: Unable to start embedded Tomcat servlet container Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start Kill tomcat service running on any port, Windows Tomcat 8 is not able to handle get request with '|' in query parameters? 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE 403 Access Denied on Tomcat 8 Manager App without prompting for user/password Difference between Xms and Xmx and XX:MaxPermSize

Examples related to http-status-code-404

Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists Vue-router redirect on page not found (404) Apache: The requested URL / was not found on this server. Apache Tomcat Servlet: Error 404 - The requested resource is not available Django, creating a custom 500/404 error page TOMCAT - HTTP Status 404 Object not found! The requested URL was not found on this server. localhost Getting 404 Not Found error while trying to use ErrorDocument Servlet returns "HTTP Status 404 The requested resource (/servlet) is not available" MIME types missing in IIS 7 for ASP.NET - 404.17