File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Debugging JSP

 
Sanjay Deshpande
Ranch Hand
Posts: 111
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
How to debug JSP pages?
How do i come to know that the Stored Procedure in bean is giving any resulSet or not...
HOW TO DEBUG JSP PAGE?
 
Michael Deng
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two ways:
1. If you don't have an IDE, add some <%System.out.println();%>.
2. If you have an IDE.
In Tomcat, the system compiles jsp into $tomcat_home$/work/your_project directory. Including this directory into your IDE source directory. Then, you can set breakpoint in your IDE.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Design your system to use helper classes such as JavaBeans that you can test separately from the JSP environment. Write a utility to test that bean with a variety of conditions.
2. Download my chapter on debugging servlets and JSP from web page for my Servlets and JSP book
Bill
[ December 14, 2002: Message edited by: William Brogden ]
 
R K Singh
Ranch Hand
Posts: 5382
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done JSP development on Apache. I generally jump in to servlet which has been generated if I cant figure out bug in JSP.
 
Anthony Nolan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following plugin for eclipse allows you to step through the generated java code for a jsp, use breakpoints etc:
http://www.sysdeo.com/eclipse/tomcatPlugin.html
This type of thing is not usually required as print statements normally suffice. The other advice about separating the logic from the display elements is key.
Anthony Nolan
Big Picture Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic