In Ubuntu with Tomcat 7 and Netbeans 7:
Follow @Satya instructions:
Check the tomcat-users.xml of the "Catalina Base" directory.
(Right-click Apache Tomcat 7.xx (under Servers) and look for the
connection tab).
Then you should make sure that your tomcat-users.xml
has something like this:
<user username="admin" password="admin" roles="manager-script"/>
(if you want to be REALLY sure, although it is NOT RECOMMENDED, you can put in roles="manager-script,manager-gui,manager-status,manager-jmx"
)
Additionally, you can look for the file build-impl.xml
under nbproject
folder and go to line:
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
Change debugmode
from "false"
to "true"
. This will allow you to see the errors in Netbeans directly.
Finally, I had to add read permissions tomcat-users.xml
for tomcat7 ** (it seems that when editing as root the permissions changed) and in the **logs folder of tomcat, add permissions to the user that runs Netbeans (usually your user). I did it creating a "development"
group and added my user and tomcat7
to that group, then I changed the group of the logs giving reading permissions.
Last tip: start Tomcat doing right-click in the Servers section in Netbeans instead of running /etc/init.d/tomcat7
start. That way you will see the logs in the Netbeans console.