jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Debugging JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Debugging JSP" Watch "Debugging JSP" New topic

Debugging JSP

Sanjay Deshpande
Ranch Hand

Joined: May 22, 2001
Posts: 111
Hi ,
How to debug JSP pages?
How do i come to know that the Stored Procedure in bean is giving any resulSet or not...
Michael Deng

Joined: Dec 05, 2000
Posts: 12
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

Joined: Mar 22, 2000
Posts: 13037
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
[ December 14, 2002: Message edited by: William Brogden ]
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5382
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.

"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Anthony Nolan

Joined: Dec 17, 2002
Posts: 2
The following plugin for eclipse allows you to step through the generated java code for a jsp, use breakpoints etc:
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
subject: Debugging JSP
It's not a secret anymore!