org.scrashmeow.ojb.console
Class ErrorPageUtils

java.lang.Object
  |
  +--org.scrashmeow.ojb.console.ErrorPageUtils

public class ErrorPageUtils
extends java.lang.Object

A set of utility classes that a JSP error page might find useful. These methods support providing error and state information in a JSP.

Author:
Alexander Bibighaus

Constructor Summary
ErrorPageUtils()
           
 
Method Summary
static java.lang.String makeBriefSummary(HttpServletRequest req, java.lang.Throwable e)
          Return a string with the thrown exception's toString() value
static java.lang.String makeErrorInfoReport(HttpServletRequest req, java.lang.Throwable e)
          Return a string with the state information about the request.
static java.lang.String makeFullErrorReport(HttpServletRequest req, java.lang.Throwable e)
          Return a string with the state and error information about the request.
static java.lang.String makeStackTraceReport(HttpServletRequest req, java.lang.Throwable e)
          Return a string the stack trace of the thrown exception.
static void reportCookies(java.lang.StringBuffer buffer, HttpServletRequest req)
          Return a string with the information about the current request cookies The string is formatted using newlines.
static void reportException(java.lang.StringBuffer buffer, java.lang.Throwable e)
          Return a string with the exception information, stack trace etc The string is formatted using newlines.
static void reportHeaders(java.lang.StringBuffer buffer, HttpServletRequest req)
          Return a string with the information about the current request headers The string is formatted using newlines.
static void reportParameters(java.lang.StringBuffer buffer, HttpServletRequest req)
          Return a string with the information about the current request parameters The string is formatted using newlines.
static void reportRequest(java.lang.StringBuffer buffer, HttpServletRequest req)
          Return a string with the information about the current request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorPageUtils

public ErrorPageUtils()
Method Detail

makeBriefSummary

public static java.lang.String makeBriefSummary(HttpServletRequest req,
                                                java.lang.Throwable e)
Return a string with the thrown exception's toString() value

Parameters:
req - the current request
e - the exception that triggered the error page
Returns:
A String formatted with newlines

makeStackTraceReport

public static java.lang.String makeStackTraceReport(HttpServletRequest req,
                                                    java.lang.Throwable e)
Return a string the stack trace of the thrown exception.

Parameters:
req - the current request
e - the exception that triggered the error page
Returns:
A String formatted with newlines

makeErrorInfoReport

public static java.lang.String makeErrorInfoReport(HttpServletRequest req,
                                                   java.lang.Throwable e)
Return a string with the state information about the request. The string is formatted using newlines.

Parameters:
req - the current request
e - the exception that triggered the error page
Returns:
A String formatted with newlines

makeFullErrorReport

public static java.lang.String makeFullErrorReport(HttpServletRequest req,
                                                   java.lang.Throwable e)
Return a string with the state and error information about the request.

Parameters:
req - the current request
e - the exception that triggered the error page
Returns:
A String formatted with newlines

reportException

public static void reportException(java.lang.StringBuffer buffer,
                                   java.lang.Throwable e)
Return a string with the exception information, stack trace etc The string is formatted using newlines.

Parameters:
buffer - the string buffer to write the information
e - the exception that triggered the error page

reportRequest

public static void reportRequest(java.lang.StringBuffer buffer,
                                 HttpServletRequest req)
Return a string with the information about the current request. The string is formatted using newlines.

Parameters:
buffer - the string buffer to write the information
req - the current request

reportParameters

public static void reportParameters(java.lang.StringBuffer buffer,
                                    HttpServletRequest req)
Return a string with the information about the current request parameters The string is formatted using newlines.

Parameters:
buffer - the string buffer to write the information
req - the current request

reportHeaders

public static void reportHeaders(java.lang.StringBuffer buffer,
                                 HttpServletRequest req)
Return a string with the information about the current request headers The string is formatted using newlines.

Parameters:
buffer - the string buffer to write the information
req - the current request

reportCookies

public static void reportCookies(java.lang.StringBuffer buffer,
                                 HttpServletRequest req)
Return a string with the information about the current request cookies The string is formatted using newlines.

Parameters:
buffer - the string buffer to write the information
req - the current request


Copyright © 2003 Alexander Bibighaus et al. All Rights Reserved.