Platinum Partner

JSP: Printing Java Stacktraces In JSP Pages

// This snippet shows how to view java stack traces for exceptions occurring inside jsp files.



try{
  //some code that throws an exception
}
catch(Exception e){
  // Cannot print using standard out. Cast JSP writer into a print writer.
  e.printStackTrace( new java.io.PrintWriter(out))
}

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}