This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes How does one debug servlets and business classes in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How does one debug servlets and business classes in Eclipse" Watch "How does one debug servlets and business classes in Eclipse" New topic
Author

How does one debug servlets and business classes in Eclipse

Benjamin Weaver
Ranch Hand

Joined: Apr 08, 2003
Posts: 161
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

Joined: Oct 10, 2006
Posts: 52
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

Joined: Jan 11, 2006
Posts: 160
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).


Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

Moved to the IDEs forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Another option is to use the sysdeo tomcat plugin.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Benjamin Weaver
Ranch Hand

Joined: Apr 08, 2003
Posts: 161
Thanks very much, all of you. I will try out several of these options.
Benjamin Weaver
Ranch Hand

Joined: Apr 08, 2003
Posts: 161
I have tried the Sysdeo plugin and have found little wrong with it. Thanks for the tips!
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
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).


42
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Apr 21, 2006
Posts: 1847
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)).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How does one debug servlets and business classes in Eclipse
 
Similar Threads
Debugging Servlets
Eclipse: tomcat project can't see java project
Debugging servlets
Eclipse 2.0.1 - How do I compile / debug servlets
javax.servlet not found