Month: March 2014

Tomcat 7 maven plug-in for remote deployment and remote debugging using jpda in netbeans

Posted on Updated on

I am trying to deploy web application in tomcat 7.0.42 remotely and also want to debug remote deployed web application from Netbeans 7.4. During this faced some issue also resolved it from reference but want to consolidate all this steps at one place. It would be helpful to someone who is trying this first time and also for my reference.

Tomcat maven plug-in for remote deployment:

Step 1: Add tomcat plug in build section


Step 2: Inside tomcat-users.xml which is located at catalina_home/conf add following

<user password=”passoword” roles=”manager-gui,manager-script,admin” username=”admin”/>

Step 3: Add following setting in your maven settings. File location is user home/.m2/settings.xml

<settings xmlns=”;

Step 4: from maven project run command tomcat7:deploy

Enable remote debugging in netbeans 7.4:

Step1:  Go to tomcat/Catalina home directory. Open the startup.bat file.

Set parameters at first empty line :
set JPDA_TRANSPORT=dt_socket
And last line should be replaced
call “%EXECUTABLE%” jpda start %CMD_LINE_ARGS%

Step 2: Start the tomcat using startup.bat from command line.

Step 3: From netbeans attach debugger with following setting and debug the code.

Debugger : Java Debugger (JPDA)
Connector: Socket Attach
Transport: dt_socket
Host: localhost

attach debugger

-Vinayak B