views:

13784

answers:

10

Hi. Console dogs me. Can anybody help?

The sad story starts like this. My OS is ubuntu-9.04. I installed tomcat-6.0.20 by extracting it from .tar.gz package and put it under the /usr/share/tomcat-6.020 directory.

Then I started tomcat from console, and everything seemed to be fine. localhost answered with the $CATALINA_HOME/webapps/ROOT/index.html page.

The next step was to put my tomcat in the eclipse's servers list. So, I went to Preferences > Server > Runtime Environment > Add > Apache Tomcat v6.0 (here I also browsed to my tomcat and changed JVM from JRE to JDK). Finally, I added my server to the Servers list.

So, having everything configured, I started my tomcat from the eclipse, opened a browser and asked for localhost. 404 all over sudden. Despite the fact that the eclipse's console has shown no errors.

Has anybody encountered the same problem?

A: 

Open your Tomcat settings (double click or F3 on your Tomcat instance in 'Servers' view in Eclipse):

  1. Make sure configuration path is valid and configuration is valid
  2. Click on modules tab and make sure your app is deployed.
ChssPly76
As for the configuration path, it leads to my worcspace. The Servers folder is situated here. And inside is Tomcat v6.0 Server at localhost-config folder full of configuration files...
emanemos
As for the app, I haven't created any. I've only installed tomcat and trying to see a welcome-page.
emanemos
It doesn't work that way in Eclipse. You need to specify at least one module to be published. It doesn't have to be an actual app from your Eclipse project; you can instead pick 'ROOT' from tomcat examples if you want to, e.g. "/usr/share/tomcat-6.020/webapps/ROOT" as docbase and "/" as path. Once you do that, you should see your welcome page.
ChssPly76
Thank you so much
emanemos
A: 

yes emanemos is right, I tried it today and got it working instantly. Create a new project in eclipse, I created a Dynamic web project. Create a new server, choose your apache version as the server type. Then create your pages and resources in this project space. I created index.html in Webcontent and pointed to http://localhost:8080/trial/ and I can see my index.html. (trial is the name of my project).

Jayz
A: 

I have the same problem described above. I wonder if the proposed solutions worked. Thanks!

Jorge Sanguinetti
The proposed solution works fine for me.
emanemos
A: 

Hi, I also installed tomcat-6.0.20 by extracting it from .tar.gz package in Ubuntu 9.04 and put it under the /opt/tomcat6 directory.

Then I started tomcat from console, and everything seemed to be fine. localhost answered with the $CATALINA_HOME/webapps/ROOT/index.html page.

Then I added in Preferences > Server > Runtime Environment > Add > Apache Tomcat v6.0 installation directory as /opt/tomcat6 and JRE as java 6 installlation direcory.

And then as I started my tomcat from the eclipse, I got the following error :

Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete.

Can any body help??

ra
A: 

I had the same problem and solved it folowing this steps: On the Server View, right click on the server (Tomcat 6.0 Server at Localhost) in the menu options click "Open", opens a menu with all the configurations for these server. On tab "Server Locations" you must select the option "Use Tomcat Installation (takes control of tomcat installation)".

Don not forget to check the Deploy path...

I think the reason is a problem with eclipse configuration over Tomcat and it must use the tomcat installation configuration.

builder64
A: 

I changed the Server Location to Use Tomcat and deploy path to /opt/tomcat6/webapps (tomcat is installed in /opt/tomcat6) . Saved and restarted eclipse. As I tried to start server, the same error

Could not load server configuration at /Servers/Tomcat v6.0 server. The configuration maybe corrupt or incomplete

ra
A: 

In windows vista 32 I fixed like this, In 'serverlocation' selected Use Tomcat installation(takes control of tomcat installation) and for deploy path I added my tomcat webapp dir.'C:\apache-tocat-6.0.26-windows-x86\apache-tomcat-6.0.26\webapps'. With default configuration path /Servers/Tomcat v6.0 Server at localhost-config, it just works fine.

Muthu
A: 

I fixed the "Could not load server configuration" problem by deleting the current server configuration from the Servers View and adding it again.

Carlisg
A: 

I'm with Carlisg. I had this error in Eclipse 3.6 with Tomcat 5.5: "Could not load server configuration at /Servers/Tomcat v5.5 server. The configuration maybe corrupt or incomplete." After playing around with every setting for 20 minutes and getting the same error, I just deleted the server, re-added it and it worked in about 90 seconds with no changes.

snowmanjack
A: 

set configuration path,it will work

subha