Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Tomcat 9 to eclipse

I have downloaded and installed tomcat 9 to my machine, but on Eclipse > Window > Preferences > Server > Runtime Environment, after clicking on Add, I see only Tomcat 7 and Tomcat 8, but not Tomcat 9.

What I have done: 1) installed tomcat 9 to local server; 2) updated eclipse to Mars (latest as of 2015-11-25); 3) installed eclipse "JST Server Adapters" and "JST Server Adapters Extensions"

Note: My purpose of using tomcat 9 is it seems to be the only version that explicitly support java 8 and later, and my web app is using java 8. (http://tomcat.apache.org/whichversion.html) I also have tomcat 7 exist in project but I also want to keep it in the machine, not to delete it.

Please see screenshot.

enter image description here

Please let me know about any config that I missed!

like image 370
jamesdeath123 Avatar asked Nov 25 '15 07:11

jamesdeath123


People also ask

Does Eclipse support Tomcat 9?

Though Eclipse has great support for working with Tomcat, it does not include this server in its installation package, so we have to add Tomcat manually.

How do I import Tomcat into Eclipse?

Open Window -> Preferences -> Server -> Installed Runtimes to create a Tomcat installed runtime. Click on Add... to open the New Server Runtime dialog, then select your runtime under Apache (Apache Tomcat v5.


6 Answers

There are two things to note here:

  • Tomcat 9 is not released yet. Not a final version that is. If you check the official website, you will see that the only available version is an M1 version. Hence there is no support from Eclipse WTP for this early version. It will come soon, but not yet.

  • Tomcat 9 is not the only version that explicitly supports Java 8. If you check this page, you will see that "Supports Java version: 8 and later", which in this context means, that it officially support only Java 8 and above. It does not mean however this is the only one supporting Java 8. Theoretically you should be able to use any Tomcat version, in practice a Tomcat 8 will work perfectly well, since it support Java 7 and above. The majority of people with a Java8 + Tomcat combination are using Tomcat 8. Tomcat 8 also has Eclipse WTP support.

like image 91
Gergely Bacso Avatar answered Oct 02 '22 13:10

Gergely Bacso


I was able to get the adapters for Apache 9 by installing Eclipse Java EE Developer Tools 3.9.4

enter image description here

like image 34
Ares Avatar answered Oct 02 '22 14:10

Ares


Use a later version of eclipse e.g. Eclipse Neon.

It should work.

like image 21
Mwangi Thiga Avatar answered Oct 02 '22 13:10

Mwangi Thiga


I tried all the above methods but still was unable to find solution for the problem then I did the following and that helped me to add Apache tomcat to my Eclipse IDE: After following Help>Eclipse Marketplace and installing Eclipse Java EE Developer Tools 3.10 still tomcat was not available so I went to Help>Eclipse Marketplace>Installed>Eclipse Java EE Developer Tools 3.10>Change I put tick on the following and then I got the Apache Tomcat finally in my Eclipse IDE:

  • JST Server Adapters
  • JST Server Adapters Extensions
  • JSF Tools-Tag Library Metadata(Apache Trindad)
  • Git Integration for Eclipse
like image 41
sohini chaudhuri Avatar answered Oct 02 '22 12:10

sohini chaudhuri


Use later EE version of Eclipse! Contains Tomcat adapters 8.5 and 9.0

I had same problem, but not now.

like image 33
vašátko Avatar answered Oct 02 '22 12:10

vašátko


On my side, eclipse marketplace was stucked on previous WST server adapters.
I've used old update feature Windows > Install New Software

In main update site, I found Web, XML, Java EE and OSGi Enterprise Development part, where WST Adapters where ready to update ... Eclipse update screenshot Eclipse MarketPlace often embed too much features & plugins.
On my own point view, easier to keep a light eclipse ;-)

Tested on eclipse 2020-09

like image 34
Damien C Avatar answered Oct 02 '22 12:10

Damien C