Reputation: 11
I have a third party application which has lot of servlets and jsp. I wanted to debug that by putting breakpoints on my local jboss server. How do I know that, for a particular request, the request is being processed by particular java classes and jsp, so that I can put breakpoints in the right files? I am thinking of going through the code, before setting the breakpoints, to know where to put them. But I feel this is not an efficient way to do it (as it is a very big application). Can you please suggest if there is any better way to do this? Thanks in advance.
Upvotes: 0
Views: 320
Reputation: 320
I think fastest way for debugging applications like this, is profiling application for specific usecase, in this way you can understand which classes used for this scenario and after finding classes, you can debug these classes.
for profiling application there are lots of tools.
commercial: Yourkit, JProfiler, JProbe
open source:VisualVM, Javacalltracer (create run-time sequence diagram)
Upvotes: 0
Reputation: 692171
The web.xml file contains servlet-mapping
elements indicating which servlets are mapped to which URLs. So if you know the URL, you should easily find the corresponding servlet. Now you can read the servlet code to see which other classes are involved.
Upvotes: 2