Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

debug j2ee web application using eclipse

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have all the java source codes, if I run ant to pack them into a .WAR or .EAR file and deploy to an application server like Weblogic, then can I use eclipse to debug it (assume I start my weblogic through eclipse) ?

I heard that if I want to debug a j2ee app, I have to deploy it in a way that the .class are in an expanded way, i.e. I can't just deploy a single .ear or .war and have to deploy the classes in a unpacked way, then in eclipse I link the output to that deployment location (WEB-INF/classes/..).

Is this true ?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You can deploy your application however you like.

Typically you application server needs to be configured for remote debugging if you want to debug via the basic IDE. You do this by adding these options:

to the call to start your server. You can then configure a Remote Java Application debug configuration in Eclipse to connect to the JVM. Just configure it to connect over the same port as you defined in your JAVA_OPTS.
 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Sturrock:
No. You can deploy your application however you like.

Typically you application server needs to be configured for remote debugging if you want to debug via the basic IDE. You do this by adding these options:

to the call to start your server. You can then configure a Remote Java Application debug configuration in Eclipse to connect to the JVM. Just configure it to connect over the same port as you defined in your JAVA_OPTS.



thanks Paul. Actually my case may be even simpler. I am not doing remote debugging. I am just deploying it to local PC. So I can just deploy a .ear to the local Weblogic deployment site and debug ? What's the corresponding procedure I shall follow (like the one you mentioned for remote debug) ?

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic