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: Review the instructions. Rephrase some of them..
http://wiki.apache.org/tomcat/FAQ/Developing?action=diff&rev1=10&rev2=11

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

  
  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}}}
+ 
  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 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.
-     * Set environment variables {{{JPDA_ADDRESS=8000}}} and 
{{{JPDA_TRANSPORT=dt_socket}}} and then start tomcat using {{{catalina jpda 
start}}}.
      * 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.
@@ -25, +26 @@

  
  <<Anchor(Q2)>>'''How do I remotely debug Tomcat using Eclipse?'''
  
- This answer assumes that you have a project set up with all of the fixings 
and have some idea of what you're doing in this respect. If not then thats 
really outside the scope of this topic and more in the scope of you needing 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 you have some idea of what a debugger is and how to use one.
+ 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.
  
- Make sure Tomcat is started and that your app is deployed and the sources, 
etc are all defined as resources in your app. If you have a servlet or 
something, set a breakpoint where its sure to hit on the next request. Go to 
"Run->Debug Configurations...". Click on "Remote Java Applications", then click 
"New". Type in the title and all. Notice that port 8000 from the Tomcat 
instructions. Save and run. Eclipse will connect to the VM that Tomcat is 
running under. Wow, that was easy! Now go type the url to submit to your 
servlet or whatever in your browser. Boom you hit the breakpoint right? Have 
fun!
+     * Make sure that Tomcat is started in remote debugging mode as described 
above and that your app is deployed.
+     * Make sure that you have the sources for the code that you are trying to 
debug in your IDE. For the libraries and for Tomcat itself you can "attach" the 
sources to the jar files: open a class file and then click "Attach Source..." 
button.
+     * If you have a servlet or something, set a breakpoint where it is sure 
to hit on the next request.
+     * Go to "Run->Debug Configurations...". Click on "Remote Java 
Applications", then click "New". Type in the title. Note that port 8000 from 
the Tomcat instructions. Save and run.
+     * Eclipse will connect to the JVM that Tomcat is running under. Wow, that 
was easy!
+ 
+ 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?'''
@@ -48, +55 @@

  
  <<Anchor(Q4)>>'''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]]. By default there is a single backgroung processing 
thread that run by Engine. See its 
[[http://tomcat.apache.org/tomcat-6.0-doc/config/engine.html|configuration]] 
for the default delay value.
+ 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.
  
  Interval that controls reloading of the changed JSP pages is set in the 
[[http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html|Jasper 
configuration]] in `web.xml`.
  

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

Reply via email to