2
votes

We use a external tomcat installation with netbeans. We have legacy war files inside the tomcat/webapps folder.

Now netbeans drops the war file it generates into the target folder. Is there a way I can tell netbeans to drop the war file into the tomcat webapps folder so that I can also debug that war from netbeans?

We use maven and most of the solutions are ant based.

In short how can I change the target folder of war files to tomcat/webapps in netbeans so that I can also debug the application.

Thank you.

1

1 Answers

0
votes

I am not sure that you can debug your application by just dropping the war file in a non-bundled tomcat container.

What works is this:

Add tomcat to your server's in Netbeans.

Then in your Project Properties go to Run and select the Server added above as your Server.

Then add a break point in your app and debug it.

Enjoy

UPDATE

To change the distribution path of the war file you have to edit the xml file {project_folder/nbproject/project.properties}

The property dist.dir is the destination of the war file when created.

Changing this property to dist.dir=c:/mydir/dist will result in this after building your project:

Created dir: c:\mydir\dist
Building jar: c:\mydir\dist\Test.war
do-dist:
dist:
BUILD SUCCESSFUL (total time: 27 seconds)