xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Ikeda" <anthony.ik...@proxima-tech.com.au>
Subject Intercepting SC status codes in Tomcat
Date Fri, 27 Apr 2001 23:49:52 GMT
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
    #error code refs
    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.

Anthony Ikeda
Web Application Developer,
Proxima Technology Pty. Ltd.

View raw message