Tomcat – Configure tomcat 7 with netbeans on ubuntu

javatomcat

How can i configure tomcat 7 to work with netbeans. Looking around various forums, it appears ubuntu has an unusual installation pattern, but i cant find a definitive answer as to how i can get it work with netbeans. Im attempting to add the server like this:

Tomcat config

but as you can see, its not working properly. Ive installed the default tomcat7 from the repositories. Basically, what do i need to put as the values for catalina_home and catalina_base in order to get it to work?

Im using ubuntu 11.10 x64.

Best Answer

I believe this question will help.

You need to link some of the directories since Netbeans thinks you're using an older version of Tomcat. In my experience, the accepted answer does not work, I needed to do:

cd /usr/share/tomcat7
sudo mkdir common
cd common
sudo ln -s ../lib lib

I also had a problem where it could not read server-config.xml, which I got after the first error was fixed. To solve this I did:

cd /usr/share/tomcat7
sudo mkdir conf 
cd conf
sudo ln -s /etc/tomcat7/server.xml server.xml
sudo chmod o+rx /usr/share/tomcat7/conf

This will serve netbeans with an older dir/file structure it expects.