Permalink to this page: https://cwiki.apache.org/confluence/x/8CklBg
This section of the FAQ discusses common questions related to Tomcat development.
A full explanation for Tomcat in Eclipse can be found here:
- Tomcat 89.0.x: httphttps://tomcat.apache.org/tomcat-89.0-doc/building.html#Building_with_Eclipse
- Tomcat 78.05.x: httphttps://tomcat.apache.org/tomcat-78.05-doc/building.html#Building_with_Eclipse
- Tomcat 67.0.x: httphttps://tomcat.apache.org/tomcat-67.0-doc/building.html#Building_with_Eclipse
How do I configure Tomcat to support remote debugging?
The short answer is to add the following options when the JVM is started:
If you are using shell scripts to start Tomcat, start it with the following command:
catalina jpda start
It will start Tomcat so that a remote debugger can be connected to port 8000.
The above mentioned options can be provided by setting certain environment variables. See the comments at the top of
.batfile for details.
For example, the port number and JPDA transport implementation can be set with
- If you run Tomcat using service wrapper, add the above JVM options before any other JVM options. Check the documentation for the service wrapper to determine how to set JVM options.
- If you start Tomcat from within an IDE, check the documentation for the IDE to determine how to set the required JVM options.
This answer assumes that you have a project set up and have some idea of what you are doing in this respect. If not then that is really outside the scope of this topic and you need to go to eclipse.org and read up on how to use your IDE, and maybe practice a little bit before you come back to this. We are also going to assume that you have some idea of what a debugger is and how to use one.
How do I remotely debug Tomcat using NetBeans?
This answer assumes that you know how to work with a NetBeans 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.
Monitoring interval for application reloading is controlled by the
backgroundProcessorDelay property on
Context element or on its parent containers:
Engine. See Tomcat Configuration Reference for details. By default there is a single background processing thread that is run by Engine. See its configuration for the default delay value.
Interval that controls reloading of the changed JSP pages is set in the Jasper configuration in
Official Eclipse IDE Web Tools FAQ for Tomcat
Eclipse IDE has support for development of Web applications and running them on Apache Tomcat. This support is provided by Eclipse Web Tools Platform Project. An easy way to get Web Tools is to download "for Java EE Developers" edition of Eclipse IDE.
The Web Tools project has a FAQ page.
- WTP Tomcat FAQ
- In Eclipse Help see "Web Tools Platform User Guide" > "Using the server tools" > "Testing and publishing on your server"