179

I have tomcat 5.5 installed, running and verifiable at http://localhost:8080/. The Tomcat menu option appears in the Eclipse menu bar and I can start and stop Tomcat from there. In Eclipse, it does not show as a Server Runtime Environment in Window - Preferences - Server - Runtime Environments, nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.

Edit:
Running on Windows XP.

Eclipse version is 3.5.1

Powerlord
  • 87,612
  • 17
  • 125
  • 175
Dumars
  • 1,791
  • 2
  • 11
  • 3
  • 1
    After trying all these things, I turned out I was not supplying the full binary path for tomcat i.e. /usr/local/Cellar/tomcat7/7.0.57/libexec/ in my case. Might help someone. – Usman Jan 13 '15 at 01:28

8 Answers8

346

In my case I needed to install "JST Server Adapters". I am running Eclipse 3.6 Helios RCP Edition.

Here are the steps I followed:

  1. Help -> Install New Software
  2. Choose "Helios - http://download.eclipse.org/releases/helios" site or kepler - http://download.ecliplse.org/releases/kepler
  3. Expand "Web, XML, and Java EE Development"
  4. Check JST Server Adapters (version 3.2.2)

After that I could define new Server Runtime Environments.

EDIT: With Eclipse 3.7 Indigo Classic, Eclipse Kepler and Luna, the steps are the same (with appropriate update site) but you need both JST Server Adapters and JST Server Adapters Extentions to get the Server Runtime Environment options.

Community
  • 1
  • 1
Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272
  • Worked for me too, except I obviously chose Galileo from the dropdown because that's the version I'm using. – Joey Marianer Jun 15 '11 at 18:23
  • 28
    Also works with Eclipse 4.2 M6. Don't forget to install the "JST Server Adapters Extenstion" – koppor Mar 31 '12 at 21:12
  • Worked for Eclipse Helios in Mac OS as well. Thanks :O) – Cacho Santa Feb 02 '13 at 01:32
  • Works great! Stressing @koppor's comment - Don't forget to install the "JST Server Adapters Extenstion" – Ido Cohn Aug 14 '13 at 08:07
  • +1 necromancy i know, but this really shuold be the accepted answer 4 years later.... but OP was last seen on Sep 9 '10 at 21:54... – Jakob Jun 16 '14 at 08:38
  • No Tomcat 8 option when defining a runtime on Eclipse Kepler (4.3) :( – AlikElzin-kilaka Nov 21 '14 at 13:56
  • for Mars - [download.eclipse.org/releases/mars](http://download.eclipse.org/releases/mars) – Alan Nov 13 '15 at 14:40
  • For neon, there is no need to specifiy a link, but choose all sites and filter as "jst". That one worked for me. – Yasin Okumuş Apr 06 '17 at 14:53
  • If you already have these installed and it still doesn't work, then refer to https://stackoverflow.com/a/35528812/2695332. – Vikas Nov 13 '17 at 20:57
  • 2
    For version 2019-09, in drop down select: 2019-09 - http://download.eclipse.org/releases/2019-09 and install both: JST Server Adapters and JST Server Adapters extensions – Olivier Royo Nov 14 '19 at 08:07
37

You need to go to Help>Eclipse Marketplace . Then type server in the search box it will display Eclipse JST Server Adapters (Apache Tomcat,...) .Select that one and install it .Then go back to Window>Preferences>Server>Runtime Environnement, click add choose Apache tomcat version then add the installation directory .

Java Main
  • 1,521
  • 14
  • 18
  • 2
    If you have Tomcat version > 8, and cannot find it in the list, update your eclipse to Oxygen and it will show up. If you want to use Neon, install the plugin from https://bugs.eclipse.org/bugs/attachment.cgi?id=262418 and restart Eclipse. If you are using Mars or below, these solutions will not work. – Vikas Nov 13 '17 at 21:00
  • 2
    Using Oxygen and Tomcat 9, I tried this, but the list only added up to Tomcat v8.0. I then tried the first solution in this thread installing JST Server Adapters and JST Server Adapters Extentions through the Help -> Install New Software option. It told me they were already installed and would be updated. After the update, now the Tomcat versions include 8.5 & 9.0, so it looks like that method is the better option. – Inukshuk Feb 05 '18 at 19:02
29

I had the same problem and I solved it with the following steps

  1. Help > Install New Software...
  2. Select "Eclipse Web Tools Platform Repository (http://download.eclipse.org/webtools/updates)" from the "Work with" drop-down.
  3. Select "Web Tools Platform (WTP)" and "Project Provided Components".

Complete all the installation steps and restart Eclipse. You'll see a bunch of servers when you try to add a server runtime environment.

Hoa
  • 3,179
  • 1
  • 25
  • 33
  • 1
    Well that doesn't work as I get "Eclipse Java EE Developer Tools Missing requirement: EJB component Plug-in requires 'bundle org.eclipse.emf.codegen but it could not be found and it goes on and on... – Andriy Drozdyuk Feb 08 '11 at 17:44
17
  1. Window > Preferences > Server > Runtime Environments (as you said)
  2. Add
  3. Apache > Apache Tomcat 5.5

That has worked for the past 3 versions of Eclipse at least. If there is not such an option on your eclipse, get a fresh installation (for Java EE developers).

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
  • 4
    ..assuming that OP is using "Eclipse for Java EE developers" and not "Eclipse for Java developers" sausaged with some extra (and incomplete) plugins. – BalusC Jan 04 '10 at 17:54
  • right.. I thought the servers plugin is available only in the EE version. – Bozho Jan 04 '10 at 18:09
  • It worked for me as I already had all the plugins asked in other answers. Thanks @Bozho – Kush Oct 17 '12 at 11:21
  • It'll be helpful if there's a list of dependency relations of Eclipse function and plugins. – smwikipedia Dec 15 '14 at 10:00
8

nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.

Go get "Eclipse for Java EE developers". Note the extra "EE". This includes among others the Web Tools Platform with among others a lot of server plugins with among others the one for Apache Tomcat 5.x. It's also logically; JSP/Servlet is part of the Java EE API.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • 4
    Sorry but I don't think getting EE eclipse is a solution. Eclipse was made from the beginning to be "pluggable" - so why should I download a different version of eclipse? – Andriy Drozdyuk Feb 08 '11 at 17:40
  • 5
    It has more than only the WTP. I don't stop you from installing the WTP separately via software update tool (and then fiddle afterwards with lot of missing parts of which isn't always entirely clear how/where to get them). I just wanted to make clear that you have to get the EE version from the beginning on when your intent is to develop with J2EE/JavaEE. – BalusC Feb 08 '11 at 17:43
  • I think installing the whole EE eclipse solution, just because you need a running Apache instance, is a bit of an overkill. I think the culture of eclipse should be install only what you need - not install more than you need. – Andriy Drozdyuk Feb 08 '11 at 18:00
  • @drozzy: I noticed in your other comment on Hoa's answer that you got trouble yourself with getting your Eclipse non-EE right. Did you notice the answer of user443326 as well? And the comments on Bozho's answer? I have no problems with downvotes, I'm always eligible to fix/improve the answer accordingly. I only fail to understand the downvote in this particular case when it's actually Eclipse's own fault, not mine. – BalusC Feb 08 '11 at 18:02
  • I am just saying that the answers like "Uninstall that and install another version of eclipse" do not solve the problem, they simply side-step it. Sorry for the down-vote - I've a tendency to do so without thinking. I removed it. – Andriy Drozdyuk Feb 08 '11 at 21:29
  • I was using the Eclipse IDE for JavaScript and Web Developers 2018-12 version, which did not list any Apache Tomcat details at all. I installed Eclipse IDE for Enterprise Java and Web Developers 2021-03, which did list Apache Tomcat. – B5A7 Apr 23 '21 at 00:32
1

You may get more success if you do a "search" for the runtime env from the preferences screen instead of hitting "add" - see this demo on youtube. http://www.youtube.com/watch?v=EOkN5IPoJVs&playnext_from=TL&videos=rVnITzSU2Z8 - When you hit search, you are prompted to point to the tomcat directory and then it SHOULD add it as a server runtime environment. Unfortunately for me, that is not the case (I get "no new server runtime environments were found") But you might have more success.

Tommy
  • 176
  • 1
  • 2
  • 17
1

Scenario 1: You had Eclipse showing server and now after removing the particular version you want to configure at Eclipse a new local server instance. But you can not move further.

This happens due to reason Eclipse still looks for configured version of Tomcat directory, which directory is no longer there.

There is no need till LUNA to make fresh installation!

All we need is to REPLACE the new server run time environment into eclipse after removing old one, which is non-existent. Eclipse will

enter image description here

vimal krishna
  • 2,886
  • 28
  • 22
0

Help -> check for updates upon Eclipse update solved the issue

Raj
  • 59
  • 1
  • 10