I have created a servlet that can receive parameters based on an exception and sc error code. This generates an XML String with Xerces and loads the relevant XSL file (denoted in a properties file) to produce an custom SC Error page.
 
Thing is, I want it to intercept when ever an error occurs and collect the info and display the relevant error page.
 
I'm trying to avoid using JSP's and would like to restrict it to servlets only.
 
Basic principle is:
 
    request.getParameter("errorcode");           //for example 404, 500, etc
    request.getParameter("errormessage");     //the exception stack trace
    request.getParameter("message");           //any extra text that may be added
 
In the init() method I load the properties file which lloks like:
 
    #XSL file reference properties file
    #error XSL root
    Root=/lib/error_sheets
    #error code refs
    404=error_404.xsl
    500=error_500.xsl ......
 
I'm using Tomcat 3.1 and don't require support for any other servers at this point as I'm sure other servers supply their own verison.
 
Cheers,
Anthony Ikeda
Web Application Developer,
Proxima Technology Pty. Ltd.