• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Debug J2EE appl in Eclipse

 
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
 
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
 
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
 
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 ]
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!