32

I am having trouble running tomcat 7 in eclipse kepler (newest version). I create a new project and when I select a new runtime I do not get the options for tomcat like I use to in eclipse Juno. So my question is how do I set up tomcat with eclipse kepler.

1
  • 4
    well that isn't helpful is it
    – abden003
    Commented Sep 12, 2013 at 21:49

6 Answers 6

81

If you did not install the package Eclipse IDE for Java EE Developers so you have to make sure that you install the plug-in "JST Server Adapters Extensions".

To do so, go to Help->Install New Software... and select the "Kepler" repository. Then expand "Web, XML, Java EE and OSGi Enterprise Development" and check the box for "JST Server Adapters Extensions". Click "Finish", accept, install and restart. Now you should be able to add the new server like you're used to.

5
  • 2
    This helped me out too - I had installed by accident the standard ide, without java ee tools. Adding both "JST Server Adapters" and "JST Server Adapters Extensions" helped.
    – MrLymy
    Commented Oct 16, 2013 at 14:23
  • 1
    This was a huge help. I only had to install one package to get it working: "JST Server Adapters Extensions". Commented Oct 22, 2013 at 17:34
  • I had the same problem with abden003. This answer didn't work with latest Kepler IDE Release 1. JST Server Adapters Extension had been installed and Tomcat 7 is not working. Only Tomcat 7 is not working, Tomcat 6 and below works. Commented Feb 3, 2014 at 3:38
  • What's exactly the problem? Do you could provide an error message? Do you have a valid installation configured at "Servers" for tomcat 7? Commented Feb 7, 2014 at 5:42
  • This is really helpful, and I also want to add that this plugin has a very weird name. I assumed that "JST Server Adapters Extensions" was a set of extensions to "JST Server Adapters", but actually the latter is not required to install the former, and the former seems to contain a lot of actual adapters, while the latter adds just one adapter. Commented Oct 27, 2014 at 21:19
5

Are you sure, you installed "Eclipse IDE for Java EE Developers" ?

3
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Commented Aug 7, 2013 at 9:37
  • Sorry man, am king of new to this. I don't have enough reputation to c0mment. and Thanks for your info.
    – Pavan JDev
    Commented Aug 7, 2013 at 10:35
  • 1
    You're welcome. Make good question and answers, and you'll have enough reputation points to comment soon. Good luck! Commented Aug 7, 2013 at 11:04
4

Right click on "Server" tab at the bottom -> New -> Server -> Tomcat7.0

3

Elaborating on Marvin Emil Brach's answer, for those who try to set up Eclipse for TomEE 1.6 (which is based on Tomcat 7):

There's the guide at http://openejb.apache.org/tomee-and-eclipse.html. But if you want to use an existing Eclipse Standard IDE (Kepler SR2) installation - i.e. not the "Eclipse IDE for Java EE Developers" - you'll run into this exception:

java.lang.NullPointerException: No IModelProvider exists for project P/[...] of version: Dynamic Web Module 3.0

Just installing the JST Server Adapters as recommended before didn't do it for me, but I found this hint: http://juhap.iki.fi/misc/nullpointerexception-while-creating-new-portlet-project-in-liferay-ide/. Another plugin I needed to get the server editor is WST Server Adapters. So the complete set of plugins I had to install for fixing this is:

  • Eclipse Java EE Developer Tools
  • JST Server Adapters
  • JST Server Adapters Extensions
  • JST Server UI
  • Eclipse Java Web Developer Tools
  • Eclipse Web Developer Tools
  • WST Server Adapters
1

Okay, I figured this out for anyone interested. I'm in Kepler SR1.

Go to Window > Preferences. Click on Server > Runtime Environments. Click Add... Select Apache Tomcat v7.0, then click next. Browse to where you installed Tomcat. Click Finish.

It will then be available in your New Project dialog.

Edit: This was with EE version of Kepler. If you downloaded another version, see Al's comment below.

1
  • FWIW, this is what I tried first - but I didn't see Apache Tomcat as an option until I installed the JST Server Adapters Extension. I seemed to be able to get all manner of other servers, from Jetty to JBoss to Websphere [shudder] but not Tomcat. Once I'd installed the plugin I could add the runtime in the exact manner you describe. Commented Feb 21, 2014 at 11:58
0

I had a similar issue with a 404 in Tomcat 7 in Kepler:

I could run TC fine outside of eclipse but could not start it from within eclipse.

My problem was that eclipse did not copy the root app over to the eclipse TC directory. Once I copied the root app over I was fine.

This link solved my problem:

http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html

Hope this helps and saves you a lost morning like I went through!

Not the answer you're looking for? Browse other questions tagged or ask your own question.