Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat 6 server creation using eclipse IDE on ubuntu

People also ask

How do I download and configure apache tomcat server in Eclipse IDE?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.

How can I download Tomcat in Eclipse?

Installing server runtimeStart the Eclipse WTP workbench. 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. 0 in this example):

Does Eclipse come with Tomcat?

No, eclipse cannot come with inbuilt tomcat. You have to select the appropriate tomcat version on eclipse and browse the apache tomcat server zip file in order to start it.


There’s a better workaround so you can keep Ubuntu’s Tomcat6 (taken from http://ubuntuforums.org/showthread.php?p=8541057, by DisDis)

In a terminal:

sudo apt-get install tomcat6
cd /usr/share/tomcat6
sudo ln -s /var/lib/tomcat6/conf conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat6 log
sudo chmod -R 777 /usr/share/tomcat6/conf

There. Now just go to Window/Preferences/Sever/Runtime Environments, add the Apache Tomcat6 Server and use /usr/share/tomcat6 as the installation directory!


ok, so here's what worked for me: you must go to Window>Preferences

here, go to Server>Runtime Environments

remove the old server or add your server or change the server location...

(in my case, this problem arised when i changed the tomcat server location)

now you should be able to add new servers to your environment :)


Have you been using the ubuntu-tomcat version (e.g. "aptitude install tomcat6")? If so, please download a plain vanilla version from tomcat.apache.org and use this. The Debian/Ubuntu version relocates some jars around and eclipse expects the "pure" version and jar locations.

(Also: see Eclipse bug 239179)


Remove (or edit the apache tomcat v6.0 entry in) workspace.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jst.server.tomcat.core.prefs

I think you also need to restart


I wrote a patch for solving this problem and it has been merged in Ubuntu and Debian. Now its possible to configure tomcat6 inside Eclipse without any pains.

In Ubuntu 11.04 you can install tomcat6-user package. Then configure a user instance of tomcat6 by running this command

$tomcat6-instance-create ~/my-tomcat-dir

A user instance of tomcat6 will be configured in ~/my-tomcat-dir directory.

Now to add tomcat6 inside eclipse to setup your development environment, simply point eclipse towards this directory and you will be ready to go.

If you are running an older version of Ubuntu, then you can simply download the latest version of tomcat6-user package from the Debian FTP: http://packages.debian.org/hu/sid/all/tomcat6-user/download


I had the same problem, but with tomcat 5.5. Changing the permissions on the /etc/tomcat5.5/conf (symlink from /usr/share/tomcat5.5/conf) worked. Thanks!