Reputation: 4830
I downloaded Apache Tomcat 6.0.2 And created a new server in Eclipse
Then I start the server and go to http://localhost:8080/ to see if it works. And I get a 404 error.
I've already googled it and tried to find a solution. But none of those remedies seem to work.
Any thoughts on what the problem is?
Upvotes: 14
Views: 74158
Reputation: 398
Try to use Tomcat 9 Instead of Tomcat 10
Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 without changes. Java EE based applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory. This conversion is performed using the Apache Tomcat migration tool for Jakarta EE tool which is also available as a separate download for off-line use.
Upvotes: 0
Reputation: 1396
Also, notice if you have a duplicated WEB-INF in your path. Sometimes after update a maven project you may have this issue and Tomcat points to an empty folder.
Upvotes: 0
Reputation: 9581
1- double click on server 2- Make Sure You have switched correctly the directory for tomcat here
Before
3- And Even if you do #2 above you may need do this here as well !
Again here !
Upvotes: 0
Reputation: 1
Launch your eclipse Run as administration:
For that right click on eclipse-----> run as administration.
It works.
If it not works then again do same and then follow these steps:
In Eclipse, right click on server --> Properties --> Click Switch Location --> Apply-->Ok
(This will switch the [workspace metadata] location to the installed Tomcat location.)Then go back to server, double click it. This will open Overview tab. Under this tab goto -->Server Location --> Select Use Tomcat Installation combo box.
Now close it, save it and try run your server and then rerun the URL.
Upvotes: 0
Reputation: 51
The error 404 appears when Tomcat can't find the localhost.ser file. In order to get rid of this follow these steps: 1) In Eclipse, right click on server --> Properties --> Click Switch Location --> Apply-->Ok (This will switch the [workspace metadata] location to the installed Tomcat location.) 2) Then go back to server, double click it. This will open Overview tab. Under this tab goto -->Server Location --> Select Use Tomcat Installation combo box.
Now close it, save it and try run your server and then rerun the URL.
Upvotes: 5
Reputation: 1076
If your wanting to see your Tomcat Server Homepage then you will need to specify the server path and deploy path. The default is set to Use workspace metadata (does not modify your Tomcat installation).
How to do it.
Hope this helps!
Upvotes: 8
Reputation: 11
see if below URL Helps to resolve the issue
http://www.youtube.com/watch?v=orctlc_F5Y0
Upvotes: 1
Reputation: 644
The problem is just as drvdijk mentioned, in order to run a webapp on tomcat from eclipse, it needs to be "deployed" to it. This can be done by right clicking the tomcat server -> add and remove
Alternatively, you can try to startup your tomcat server outside of eclipse. Go to your command line and type
$CATALINA_HOME\bin\startup.bat (Windows)
$CATALINA_HOME/bin/startup.sh (Unix)
Where $catalina_home is the directory of where you installed tomcat
Upvotes: 0
Reputation: 7199
i think the problem is http://localhost:8080/ when you should use http://localhost:8080/appname
Upvotes: 1
Reputation: 5180
I agree to drvdijk.
Go to "Servers" window, then select your Tomcat instance. Double.click here you will see the "overview" window. Here you can click on "Open launch configuration" to see your Tomcat arguments ("Arguments" tab).
Look for the system property "-Dwtp.deploy". This directory is where your Tomcat is looking for installed web applications, i think you don't have ROOT.war application here. Isn't it? :-)
Hope this will help you
Upvotes: 3
Reputation: 5554
From the top of my head, I thought Eclipse started the tomcat server without anything in it, i.e. no web applications. You have to 'run' or actually deploy something in that Eclipse Tomcat server so you won't get the 404s.
The fact that you do get 404 error messages indicates that Tomcat actually IS running. If you shut it down from Eclipse, you won't get those 404's anymore ;)
Upvotes: 13