3

When I get an error while working with JSP/servlets it is shown a page like this:

enter image description here

Despite being sufficient to track the majority of the problems, I was wondering if there is some components that you can add to your web application to give you more debugging info (for example: something like Django debug page/ debug toolbar that shows session data, SQL queries executed, etc).

enter image description here

I know Java and Python are two very different worlds, and even those two tools are specific to Django. But there are some tools in Java similar in purpose the ones I referred early?

3
  • Not directly and answer to your question on JSP hence posting as comment. In in the Java World where now a lot of people use JSF for the presentation layer, facelets has a <ui:debug /> tag which does something similar to what you have shown.
    – rgeorge
    May 30, 2013 at 7:27
  • @rgeorge Can you write an answer based in your comment? Probably that is the closest available tool.
    – Salem
    Jun 4, 2013 at 20:25
  • I asked a similar (now deleted) question as there is also a very sophisticated toolbar for Symfony (PHP) but I know nothing comparable in the Java world. Rails seems to even have multiple, e.g. Rack insight. Sep 26, 2014 at 16:29

1 Answer 1

0

In the web.xml you can map the error code to specific pages in the form:

<error-page>
 <error-code>500</error-code>
 <location>/errors/servererror.jsp</location>
</error-page>

and print the debug info directly in the jsp page.

1
  • Thanks jsfviky71 but I'm looking to an improve in the debugging of pages: some tool that can add more info to that page. Probably there is nothing similar in Java...
    – Salem
    May 29, 2013 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.