Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This answer assumes that you have correctly set up know how to work with a NetBeans project and that you know Project, and also how to use the NetBeans debugger. If not, please go to http://www.netbeans.org/kb/using-netbeans/40/debug.html and read up on how to use NetBeans and its debugger.

Starting with Tomcat trunk revision 1484409, the Tomcat source includes Ant tasks to configure your source directory as a NetBeans Free-Form Project. After you have successfully run Ant with the default build target (deploy), you can then run the ide-netbeans target. This task will configure your sandbox copy of Tomcat so the source can be inspected, maintained and debugged under the NetBeans IDE. You should follow the detailed instructions in the README.txt file that will have been installed in your new nbproject directory.

Make sure that Tomcat is started in debug mode as described above, that your application is deployed, and that the sources are all defined as resources in your application. If you have a servlet or JSP file, set a breakpoint where you think a problem might be occurring. Go to "Run->Attach Debugger". A dialog pops up to let you specify the following options:

...

Note that NetBeans has a second option – you can debug JSP files and servlets locally using a Tomcat server that is bundled with the IDE. When you debug a JSP file or servlet in the IDE, the bundled Tomcat server automatically starts in debug mode, and the debugger connects to it.

The Tomcat NetBeans targets have not yet been back-ported to Tomcat 7. You can copy the files from your copy of the trunk and they should only require minimal editing of paths to work with older versions of Tomcat.

Other

Anchor
Q4
Q4

How do I change the monitoring interval for modified resources and application reloading?

...