• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse IDE: set a break on Spring DispatcherServlet

 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic