Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does one debug servlets and business classes in Eclipse

 
Benjamin Weaver
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Couldn't find an answer to this using the Search facility, so here goes:

Let's say you have a servlet which talks to some business objects. All of this is running in Tomcat. After 3 days I am already tired of debugging servlets using logfiles. I want to debug by stepping through the servlet and business object code in an Eclipse IDE. I am running Tomcat 5 and Eclipse 3.2. How does one do this?

1. Are extra Eclipse plugins necessary? or do you set this up somehow in Eclipse configuration files?

2. Is there a best way of doing all this?
 
Prem Kashyap
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you will need to get the tomcat plugin for eclipse and put it into the plugins folder of eclipse. I am currently debugging servlet and other business class using the same technique.
If you need detailed steps to configure tomcat plugin with eclipse, then mail me at xxx@xxx. I will be more then happy to help you out in this matter.

Regards
Prem
SCJP1.4:88%

[Deleted Email address. Please use this forum so that the whole community can benefit. Thanks, Ilja]
[ November 11, 2006: Message edited by: Ilja Preuss ]
 
Rashid Mayes
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of eclipse are you using? If you are using the web tools version you do not need any special plugins. After defining your server debugging is simple. Set your break points and start you server in debug mode(use the debugging perspective).
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the IDEs forum.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another option is to use the sysdeo tomcat plugin.
 
Benjamin Weaver
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much, all of you. I will try out several of these options.
 
Benjamin Weaver
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried the Sysdeo plugin and have found little wrong with it. Thanks for the tips!
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need any plugin AFAIK. Eclipse has remote debugging capabilities (or is that another plugin? ) which work quite well (I use them almost daily, all I'm missing is a way to run 2 remote debuggers side by side in order to debug 2 remote applications talking to each other at the same time).
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen T Wenting:
You don't need any plugin AFAIK.


That's true. It's just easier with the plugin.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could be. I've got Callipso installed from the moment I installed 3.2
Never used the built-in server options though, the servers we use at work aren't supported (Resin 2 and 3, JBoss 3.2.7 (the JBoss 3 support doesn't work with that build), and WebLogic 6 (I know it's old, it's legacy)).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic