tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergi Erola <>
Subject Re: Tomcat, eclipse and jpda
Date Fri, 05 Dec 2003 17:39:07 GMT
Thanks Jeff
But, I have one question... The servlet code must be in server machine or client machine?Or
two machines?  I call client machine the machine that has eclipse. And I must call servlet
in with server url? Moreover, where is the debug information? 

Jeff Tulley <> wrote:
For debugging servlets, you simply start Tomcat up on the server machine in jpda mode, make
sure you have a project in eclipse with all of your servlet code (compile with debug information,
which in my eclipse is the default), and put a breakpoint in the servlet code. Connect to
the Tomcat debug process. Then, hit the servlet with a browser, and your debugger should stop
at your breakpoint no problem.

JSPs are trickier since the source code is generated at runtime. You CAN pull in the .java
file from the tomcat work directory, put it in your project, and maybe have some luck at getting
a breakpoint set. (I do not know if it would be compiled with debug information or not though.
You could use a precompilation script to guarantee this). There might be some Eclipse plugins
that do JSP source-level debugging now, though I haven't seen one.

If you have to debug servlet init code, that is a bit trickier, though not much. Simply change, where it has the JPDA arguments, changing "suspend=n" to "suspend=y". Then the
Tomcat java process will start up and immediately suspend itself until you connect with the
debugger and resume the process.

For servlets, there is nothing too different than debugging any other plain java code.

>>> 12/5/03 8:26:12 AM >>>
I read the message in tomcat-user list about eclipse, tomcat and jpda, but i don't understand
very well. I have two machines, one is a tomcat server and the other machine is my workstation.
I execute tomcat with "./ jpda run" and i can connect with eclipse when I try to
debug. This is a client machine. But, I don't debug anything. The project to debug where would
it stay??? In server or client machine??? Moreover, how can i execute the jsp or sevlet???
With URL http://server:8080/ ????

Yahoo! Sorteos
¡Ya puedes comprar Lotería de Navidad!

Jeff Tulley (
Novell, Inc., The Leading Provider of Net Business Solutions

To unsubscribe, e-mail:
For additional commands, e-mail:

Yahoo! Sorteos
¡Ya puedes comprar Lotería de Navidad!
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message