Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer
    
From nickb answer, you should advance to make a tomcat-users.xml at your /usr/share/tomcat7/conf folder. You can just copy the one you got at /etc/tomcat7/ folder. Works for me. –  user206264 Jan 21 at 9:45
    
Wouldn't symlinking them be a better idea? That way both files always have the same contents. Also, why do you feel the need to provide a second copy of nickb's answer? Better to spend your time answering questions that don't already have an adequate answer. –  Ladadadada Jan 21 at 10:44
    
Please note that this is a huge security risk. There's a reason these files are not readable for a user, they contain passwords. –  vbence Mar 24 at 13:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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