Debugging in Struts 1.x by placing break points in Struts core classes(i.e in ActionServlet.java,..)
Rao Potla
Greenhorn
Joined: Jan 14, 2012
Posts: 9
posted
0
Hi,
Please help me in How to perform debugging in struts 1.x core classes like ActionServlet.java, RequestProcessor.java ? is it possible to perform debugging operations in Struts 1.x provided core classes?
One possibility that has worked for me (not for Struts specifically, but I have used it for other open-source projects): create a new project with the source code for Struts 1 and make your project depend on it. Also, remove any Struts JARs from your project so that the Struts project is used for all Struts code. Then set your breakpoints in the Struts project.
The other thing I have done is edited the Struts source file I need to get more info about, adding in printlns and such, and replacing that file (or files) in the JAR and running with that. This is a little slower, and doesn't allow you to easily step through code to see what is going on, but has helped me uncover numerous bugs or find out why things weren't working as I expected.