permaculture playing cards*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Debug J2EE appl 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Debug J2EE appl in Eclipse" Watch "Debug J2EE appl in Eclipse" New topic
Author

Debug J2EE appl in Eclipse

Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
Hello,

Is there any way to debug a J2EE app in eclipse. If so please tell me how.

Thanks,

Bhumika.


SCBCD (Preparing) <br />SCWCD, 82%<br />SCJP, 90%
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
please help
Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
I was able to do this with Eclipse. I was running Jetty as an app-server. First, you should configure and enable support for your app-server in Windows/prefs/MyExclipse/Application Servers.

What I did then was deploy my .war file and run Jetty through eclipse. I could then hit servlet (but not JSP) breakpoints.

good luck
Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
I haven't tried the following, but from what I've heard, these options might be viable:
log4J
MyEclipse WorkBench
Amol Fuke
Ranch Hand

Joined: Apr 08, 2005
Posts: 129
Bhoomika,

You need to start your server in debug mode and place breakpoint in the JSP,Java code.
Go to debug mode you will get the server name and its status.(started,stopped)Right click on the server name and click on debug.By doing this your server will start in debug mode and with the help of break points you can debug your application.


"There are no mistakes, only lessons"
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
I'm using Eclipse and I start/stop Tomcat manually. How do I configure a server in Eclipse? I think its possible in Websphere but not in Eclipse.
Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
Depending on your version, it should be what I mentioned earlier:

"First, you should configure and enable support for your app-server in Windows/prefs/MyExclipse/Application Servers."
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
Got it!!!

set 2 environment variables:

set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8000

start tomcat by
---------------
catalina jpda start

Eclipse
--------
set breakpoints
debug as --> remote java application --> New


http://jakarta.apache.org/tomcat/faq/development.html
[ July 06, 2005: Message edited by: Bhumika Thakkar ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Debug J2EE appl in Eclipse
 
Similar Threads
Eclipse plugin to debug web based application ?
jsp/JavaScript - Eclipse Debug perspective ?
debug j2ee application from Eclipse
java.lang.OutOfMemoryError: Java heap space
Debug JSP