• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to debug a jsp?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want know how i can debug a jsp? do i need a tool for it or can i do it with apache-tomcat?

$regards
 
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
Tomcat does not contain any special debugging tools, but you can execute Tomcat from a commercial debugger. JSP are a pain to debug for sure. My advice:
1. Use JavaBeans or other classes that can be tested independently of the JSP as much as possible.
2. Always define an error page and have it dump a stack trace.
3. For complex page layout, start with a plain HTML page that works and add JSP gradually.
4. Always view-source to see what your JSP really wrote.
Bill

------------------
author of:
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most easiest and efficient way i have found of debugging jsp's is to use System.out.println(); which helps you in clearly knowing what part of your code is been parsed and where its not entering and the moment any of ur s.o.p statements that you have given doesnt get printed on the console then there lies the problem...........
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic