e.printStackTrace( new PrintWriter( sw ) );
log.severe( sw.toString() );
try
{
ErrorPage errorPage = RequestCycle.get().getWebApplication().getErrorPage().newInstance();
errorPage.setError( e );
httpResponse.getWriter().write( errorPage.render() );
httpResponse.setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR );
}
catch ( Exception e1 )
{
log.severe( "Error occurred during creating error page:" + e1 );