• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Debugging JSP

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic