tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tomcat Wiki] Update of "FAQ/Developing" by KonstantinKolinko
Date Sun, 27 Feb 2011 17:44:35 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The "FAQ/Developing" page has been changed by KonstantinKolinko.
The comment on this change is: Reformat. Split into subsections..
http://wiki.apache.org/tomcat/FAQ/Developing?action=diff&rev1=11&rev2=12

--------------------------------------------------

  This section of the FAQ discusses common questions related to Tomcat development.
  
  == Questions ==
+  1. [[#Debugging|Debugging]]
-  1. [[#Q1|How do I configure Tomcat to support remote debugging?]]
+    1. [[#Q1|How do I configure Tomcat to support remote debugging?]]
-  1. [[#Q2|How do I remotely debug Tomcat using Eclipse?]]
+    1. [[#Q2|How do I remotely debug Tomcat using Eclipse?]]
-  1. [[#Q3|How do I remotely debug Tomcat using NetBeans?]]
+    1. [[#Q3|How do I remotely debug Tomcat using NetBeans?]]
+  1. Other
-  1. [[#Q4|How do I change the monitoring interval for modified resources and application
reloading?]]
+    1. [[#Q4|How do I change the monitoring interval for modified resources and application
reloading?]]
  == Answers ==
+ 
+ === Debugging ===
+ 
+ <<Anchor(Q1)>>
- <<Anchor(Q1)>>'''How do I configure Tomcat to support remote debugging?'''
+ ==== How do I configure Tomcat to support remote debugging? ====
  
  The short answer is to add the following options when the JVM is started:
+ {{{
- {{{-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n}}}
+ -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+ }}}
  
  There are a number of ways you can do this depending on how you normally start Tomcat:
-     * If you are using shell scripts to start Tomcat, start it with the following command:
{{{catalina jpda start}}}<<BR>>The above mentioned options can be provided by
setting certain environment variables, e.g. {{{JPDA_ADDRESS=8000}}} and {{{JPDA_TRANSPORT=dt_socket}}}.
See comments at the top of {{{catalina.sh}}} or {{{.bat}}} file for details.
+     * 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 {{{catalina.sh}}} or {{{.bat}}} file for details.
+ 
+ For example, the port number and JPDA transport implementation can be set with {{{JPDA_ADDRESS=8000}}}
and {{{JPDA_TRANSPORT=dt_socket}}}.
+ 
-     * If you run Tomcat using service wrapper, add the above JVM options before any other
JVM options. Check the documentation for the service to determine how to set JVM options.
+     * 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.
  
  The port does not need to be set to 8000, it may be any value appropriate for your system.
@@ -24, +42 @@

  Whilst this is very useful in development it should not be used in production because of
both security and performance implications.
  
  
+ <<Anchor(Q2)>>
- <<Anchor(Q2)>>'''How do I remotely debug Tomcat using Eclipse?'''
+ ==== How do I remotely debug Tomcat using Eclipse? ====
  
  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 [[http://eclipse.org|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.
  
@@ -37, +56 @@

  Now go type the url to submit to your servlet or whatever in your browser. Boom you hit
the breakpoint right? Have fun!
  
  
- <<Anchor(Q3)>>'''How do I remotely debug Tomcat using !NetBeans?'''
+ <<Anchor(Q3)>>
+ ==== How do I remotely debug Tomcat using NetBeans? ====
  
  This answer assumes that you have correctly set up a [[http://netbeans.org/|NetBeans]] project
and that you know 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.
  
@@ -53, +73 @@

  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.
  
  
+ === Other ===
+ 
+ <<Anchor(Q4)>>
- <<Anchor(Q4)>>'''How do I change the monitoring interval for modified resources
and application reloading?'''
+ ==== How do I change the monitoring interval for modified resources and application reloading?
====
  
  Monitoring interval for application reloading is controlled by the `backgroundProcessorDelay`
property on `Context` element or on its parent containers: `Host` and `Engine`. See [[http://tomcat.apache.org/tomcat-6.0-doc/config/index.html|Tomcat
Configuration Reference]] for details. By default there is a single background processing
thread that is run by Engine. See its [[http://tomcat.apache.org/tomcat-6.0-doc/config/engine.html|configuration]]
for the default delay value.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message