NextApp Echo
App Container 1.0.5

nextapp.echoservlet
Class ErrorHandler

java.lang.Object
  extended bynextapp.echoservlet.ErrorHandler

class ErrorHandler
extends java.lang.Object

An application error handler/logger that will notify the user with both a simple HTML page and JavaScript alert.


Field Summary
private static int errorIdCount
          Error id counter
private static java.lang.String HTML_1
          The first segment of the "template" used to display the HTML error page.
private static java.lang.String HTML_2
          The second segment of the "template" used to display the HTML error page.
private static java.lang.String HTML_3
          The third segment of the "template" used to display the HTML error page.
private static java.lang.String HTML_4
          The fourth segment of the "template" used to display the HTML error page.
private static java.lang.String POST_ERROR_TEXT
          Text that follows the error message
private static java.lang.String PRE_ERROR_TEXT
          Text that preceeds the error message
 
Constructor Summary
private ErrorHandler()
          Non-instantiable class.
 
Method Summary
(package private) static void process(InstancePeer instancePeer, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServlet servlet, java.lang.Exception ex)
          Renders an error page and shuts down the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRE_ERROR_TEXT

private static final java.lang.String PRE_ERROR_TEXT
Text that preceeds the error message

See Also:
Constant Field Values

POST_ERROR_TEXT

private static final java.lang.String POST_ERROR_TEXT
Text that follows the error message

See Also:
Constant Field Values

errorIdCount

private static int errorIdCount
Error id counter


HTML_1

private static final java.lang.String HTML_1
The first segment of the "template" used to display the HTML error page.

See Also:
Constant Field Values

HTML_2

private static final java.lang.String HTML_2
The second segment of the "template" used to display the HTML error page.

See Also:
Constant Field Values

HTML_3

private static final java.lang.String HTML_3
The third segment of the "template" used to display the HTML error page.

See Also:
Constant Field Values

HTML_4

private static final java.lang.String HTML_4
The fourth segment of the "template" used to display the HTML error page.

See Also:
Constant Field Values
Constructor Detail

ErrorHandler

private ErrorHandler()
Non-instantiable class.

Method Detail

process

static void process(InstancePeer instancePeer,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    javax.servlet.http.HttpServlet servlet,
                    java.lang.Exception ex)
             throws javax.servlet.ServletException,
                    java.io.IOException
Renders an error page and shuts down the application. The application's session will be invalidated, and JavaScript will be executed to close extra browser windows if they have been opened. The error will be logged to the Servlet log file.

Parameters:
request - The HTTP request object provided by the servlet container.
response - The HTTP response object provided by the servlet container.
servlet - A reference to the application's underlying HttpServlet. The servlet is required to access the logging facility.
ex - The fatal exception.
Throws:
javax.servlet.ServletException
java.io.IOException

NextApp Echo
App Container 1.0.5