Server configuration is missing in Eclipse

Viewed 123142

Im using Eclipse Galileo, and have configured it for Apache Tomcat . I have added Apache Tomcat 6.0 to Windows->Server->Runtime Environments, with the following settings:

Tomcat Installation Directory - C:\apache-tomcat-6.0.24\apache-tomcat-6.0.24
JRE - Workbench Default JRE (This points to C:\Program Files\Java\jre6)

Now, I create a Dynamic Web Project, and add a JSP file to it. But, when I run the project I get the following error:

The Tomcat server configuration at \Servers\Tomcat v6.0 Server at localhost-config is missing. Check the server for errors.

Any way to fix this?

13 Answers

In Eclipse Neo
1. Window -> Show view -> Servers
2. Right click on server -> choose Properties
3. From General Tab -> Switch Location

You need to define the server instance in the Servers view.

In the box at the right bottom, press the Servers tab and add the server there. You by the way don't necessarily need to add it through global IDE preferences. It will be automagically added when you define it in Servers view. The preference you've modified just defines default locations, not the whole server instance itself. If you for instance upgrade/move the server, you can change the physical location there.

Once defining the server in the Servers view, you need to add the newly created server instance to the project through its Server and Targeted runtime preference.

Did you, by any chance, deleted stuff from your workspace, or moved it around?

When you create a server for the first time, either globally or through the project's "run on server" settings, Eclipse creates a project in the Servers view, as BalusC pointed out. Eclipse stores this server inside your workspace, in a project called Servers. The project needs to be open for tomcat to run.

(If you want, you can store the server settings elsewher. You can right click and open the server instance from the Servers view and configure various parameters and locations)

In my case, the server list was empty for Apache in "Run Configurations" when I opened

Run > Run Configurations enter image description here

I fixed this by creating a server in the Servers Panel as in other answers:

  1. Window -> Show view -> Servers
  2. Right click -> New -> Server : to create a new one

enter image description here

enter image description here

this worked for me

  1. In the Server's tab in Eclipse, Stop the Tomcat server

  2. Right-click the server and select "Clean..."

  3. Right-click the server again and select "Clean Tomcat Work Directory..."

  4. In the Eclipse, select the top-level menu option, Project > Clean ...

  5. Be sure your project is selected and click Ok

  6. Restart Eclipse

4th Step is most important.

  1. Go to Servers remove the existing server by clicking delete.
  2. Click the blue link to launch the server.
  3. Set a new runtime environment.
  4. Close the Eclipse and launch it again.
  5. Boom it works!
Related