13

I open Servers view, right click and go to new->server menu.

When I select Tomcat 6 or Tomcat 7 the next button works well however when I select Tomcat 8 the next button is greyed out.

How can I add a tomcat 8 in this case?

Ismail Yavuz
  • 5,357
  • 5
  • 24
  • 46

7 Answers7

26

I'm using Ubuntu 14.04 and Eclipse mars2 and the accepted answer for this question didn't work for me. I tried everthing from installing new software (extensions, unnecessary because mars already have native support for tomcat8), and adding/removing runtime environments without success.

It is a bug into Eclipse.

Here is the workaround that worked for me:

Close Eclipse
In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
    org.eclipse.wst.server.core.prefs
    org.eclipse.jst.server.tomcat.core.prefs
Restart Eclipse

Source: Eclipse add Tomcat 7 blank server name

Eventhough it says tomcat 7, it worked for the same problem with tomcat 8 too.

Community
  • 1
  • 1
  • You are a savior. Thanks a lot. – Abhay Dwivedi Sep 21 '17 at 17:33
  • Works for Eclipse Neon on MacOS High Sierra with Tomcat 9.0. – Anish Sana Dec 31 '17 at 19:43
  • Hey, These files are not there in the specified location.Can you please help. – Tanvi Garg Feb 11 '18 at 08:04
  • After following these steps I clicked Server > Runtime Environments > Add... > Apache Tomcat v8.0 > Next... > Download and Install > I accept... > Finish > I then choose a location for it to be installed > It installed it in the background > I clicked Finish, and I saw that it was good. Previously, without following these steps, it didn't install tomcat 8 in the background. – mekazu May 24 '18 at 03:58
13

There are a few resource on the web about this problem but no answer on SO.

If you were never add a tomcat8 to eclipse there would be no problem just like tomcat7 or tomcat6. But there is a setting about tomcat8 and that is wrong. In that menu there is no option to reconfigure settings.

Just go to Window->Preferences->Server->Runtime Environments and Remove or Edit the old, wrong settings. Then you will be able to add tomcat8 too!

Ref: http://www.codejava.net/servers/tomcat/how-to-add-tomcat-server-in-eclipse-ide

Ismail Yavuz
  • 5,357
  • 5
  • 24
  • 46
3

It is a bug in Eclipse. You can follow following steps for overcome this problem.

  • Close Eclipse

  • Go {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings

  • delete the following two files:

  • org.eclipse.wst.server.core.prefs

  • org.eclipse.jst.server.tomcat.core.prefs

  • Restart Eclipse

DilanG
  • 1,097
  • 1
  • 22
  • 39
  • 1
    This is actually the same answer than the one given by ***Computer Science Student***. almost copy-pasted i'd say. – Sirmyself Dec 19 '17 at 22:32
2

First try removing/editing respective server at

Window->Preferences->Server->Runtime Environments

then go ahead adding new server, Even after deleting old setup on Window->Preferences->Server->Runtime Environments - If you still have this issue while on Define a New Server from servers tab of eclipse, now try adding tomcat at Window->Preferences->Server->Runtime Environments as we've deleted earlier & then go to Define a New Server from servers tab to create new server, this should work.

whoami - fakeFaceTrueSoul
  • 13,846
  • 4
  • 23
  • 39
0

I had this issue too, and it was caused by unsufficient file-access rights to the Tomcat server installation directory.

Make sure you have read-access to all files within the Tomcat installation directory you configured in Eclipse (this can be an issue for example if you use the standard tomcat installed in Ubuntu, if you do not belong to the tomcat8 group).

Laurent Grégoire
  • 3,724
  • 26
  • 48
-1

Just go to Window->Preferences->Server->Runtime Environments and Remove the server. Try to add the server from there only. You will see another folder has been created with the same name. Provide valid path. Restart eclipse and add server from server console.

Hope it will help..

The Hungry Dictator
  • 3,247
  • 4
  • 34
  • 47
Utsav Jain
  • 21
  • 1
-1

Go to Window->Preferences->Server->Runtime Environments remove tomcat configuration and save.

Go to server view( Window -> show view ->server) configure the tomcat server again.

Sateesh
  • 1
  • 1
  • Welcome to SO. This is basically what others have already answered, hence this answer does not really add anything. – Qben Dec 15 '20 at 07:56