Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse IDE: set a break on Spring DispatcherServlet

 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have a regular web app or a regular java app, I can set a break on the servlet or util class I have the source code.

Now for Spring MVC (for example), I have the jar file placed in WEB-INF\lib folder,
how I can set a break any where within org.springframework.web.servlet.DispatcherServlet?

Generically speaking, how I can set a break on thirdparty jar like struts etc...? because I want to debug the flow.

What are the basic systematically steps that I should do? Thanks.
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those are open source, which means that the sources are available - download the sources and put them on your PC. And Eclipse let's you attach the sources to the JARs - in your project's properties, under Java Build Path, Libraries tab, expand the desired JAR and you will see a Source Attachment entry, click on that click the Edit button and browse to where the sources are located.

By the way, if you are using Maven you can do this automatically by configuring the Maven setting in Eclipse to download the source and doc files automatically. Then as long as the source and doc jars are available in the Maven repository, they will be used.

Once you do all of that, you should be able to step into the methods used in that JAR.
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your 1M$ answer. How I can give you 2 thumbs up? 1 for eclipse and 1 for maven. Extremely cool!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic