Two Laptop Bag
The moose likes IDEs, Version Control and other tools and the fly likes Debugging in Struts 1.x by placing break points in Struts core classes(i.e in ActionServlet.java,..) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "Debugging in Struts 1.x by placing break points in Struts core classes(i.e in ActionServlet.java,..)" Watch "Debugging in Struts 1.x by placing break points in Struts core classes(i.e in ActionServlet.java,..)" New topic
Author

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
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?

Thanks in advance
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4875

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.


JBoss In Action
 
 
subject: Debugging in Struts 1.x by placing break points in Struts core classes(i.e in ActionServlet.java,..)
 
Threads others viewed
<action-mapping>
What Design Pattern should I use?
problem dispaly error message in struts
Unable to initialize Struts ActionServlet
class not found exception
IntelliJ Java IDE