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

how to debug a jsp?

 
marko markovic
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • 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:
 
Poornima Shetty
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • 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...........
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic