Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to debug errors in JSP Page  RSS feed

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!