Configure TOMCAT in Eclipse

17,911

Solution 1

Even though its late, I'm posting this for future readers. I found out there is an easy way of doing that. You can follow this blog post which is providing a step by step guide to do it: Install Apache Tomcat on Ubuntu

Step 1: Open the Eclipse.

Step 2: Goto Windows → Preferences in the menu bar and select the Runtime Environments under the Server.

enter image description here

Step 3: Click on the 'Add' button.

Step 4: Select your Apache Tomcat version under the 'Apache' root and click 'Next'.

enter image description here

Step 5: Browse and select the Tomcat installation directory.

enter image description here

Step 6: Click on the 'Finish' button

Step 7: Click on the 'OK' button to close the Preferences dialog.

enter image description here

Solution 2

You are specifying tomcat source directory but it needs to specify tomcat binary installation root directory, also known as CATALINA_HOME.

You can download apache-tomcat and untar it there or add a links.

If you untar apache-tomcat in /opt/apache-tomcat-7 you can create symbolic links to its folders.

/etc/tomcat/tomcat7$ ln -s /opt/apache-tomcat-7/conf conf
/etc/tomcat/tomcat7$ ln -s /opt/apache-tomcat-7/lib lib
/etc/tomcat/tomcat7$ ln -s /opt/apache-tomcat-7/logs logs
/etc/tomcat/tomcat7$ ln -s /opt/apache-tomcat-7/webapps webapps
/etc/tomcat/tomcat7$ ln -s /opt/apache-tomcat-7/work work

I hope this helps!

Solution 3

In Ubuntu, the application doesn't have default permission to read/edit all the folders.

Change the permission for tomcat to 755 and it will work.

sudo chmod -R 755 /opt/tomcat/apache-tomcat-9.0.24/
Share:
17,911

Related videos on Youtube

kishoredbn
Author by

kishoredbn

Coder by hobby, and Stackoverflowing at spare time.

Updated on September 18, 2022

Comments

  • kishoredbn
    kishoredbn almost 2 years

    I have by default TOMCAT installed in my system which I can start/stop from terminal using:

    sudo /etc/init.d/tomcat7 start
    sudo /etc/init.d/tomcat7 stop
    

    But unfortunately I can't configure the same in Eclipse.

    I have tried all possibilities of directing the Apache Tomcat v7.0 in the Tomcat Installation directory (Window→Preferences→Server→Runtime Environment→Add→Tomcat7) but still getting this notification: "Unknown version of Tomcat was specified."

    Can anyone help me with Tomcat configuration for Eclipse (without re-installing another server).

  • hmayag
    hmayag almost 9 years
    When providing an external link with a solution, keep in mind that links may become unavailable. Thus it is preferable to include a short description of what's involved in the solution. This way your answer will remain helpful and relevant even if the referenced site "dies."