Tomcat7 server in eclipse with ubuntu

Annoyingly there isn’t one “installation directory” for tomcat on ubuntu, instead it is spread across /var/log, /usr/share /var/lib etc. Eclipse expects one directory with log, conf etc. This can be fixed with a few carefully placed symlinks.

sudo apt-get install tomcat7

# fix directories
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /var/log/tomcat7 log
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R a+rwx /usr/share/tomcat7/conf

# allow startup from inside eclipse
/etc/init.d/tomcat7 stop 

1 comment

  1. It works, thank you for this information 😉

    NB : We have to think stopping the existing tomcat service before run a new tomcat instance via Eclipse.
    –> sudo service tomcat7 stop


Leave a comment

Your email address will not be published.