Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to debug errors in JSP Page

 
Ashley Herb Scoot
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to debug errors in JSP Page working on Tomcat5.0,Apache server. Is there any way we can pinpoint where the error has error took place.

Thank you
 
Gert Cuppens
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're talking about syntax errors, you should know that every JSP is translated into a servlet before being compiled to a .class file. So, it is possible that a JSP file containing only 89 lines will give a syntax error at line 123. The solution ? Go find the corresponding servlet (myJSP.jsp will be translated into myJSP_jsp.java) and look at line 123.

If on the other hand you're talking about logical errors (the JSP file does compile and is shown but does someting unexpected), you could use the Log4J classes. A very good introduction can be found at http://www.vipan.com/htdocs/log4jhelp.html.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!