Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Debug J2EE appl in Eclipse

 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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

Thanks,

Bhumika.
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help
 
Tom Katz
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried the following, but from what I've heard, these options might be viable:
log4J
MyEclipse WorkBench
 
Amol Fuke
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic