aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse IDE: set a break on Spring DispatcherServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse IDE: set a break on Spring DispatcherServlet" Watch "Eclipse IDE: set a break on Spring DispatcherServlet" New topic
Author

Eclipse IDE: set a break on Spring DispatcherServlet

H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
    
    4
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

Joined: May 14, 2008
Posts: 5843
    
    7

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.


JBoss In Action
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
    
    4
Thanks for your 1M$ answer. How I can give you 2 thumbs up? 1 for eclipse and 1 for maven. Extremely cool!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse IDE: set a break on Spring DispatcherServlet