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 Fw: Intercepting SC status codes in Tomcat - Wrong list sorry
Date Sat, 28 Apr 2001 00:02:52 GMT
Sorry wrong mailing list!!!

Won't happen again :)
----- Original Message ----- 
From: Anthony Ikeda 
To: XML General @ Apache 
Sent: Saturday, April 28, 2001 9:49 AM
Subject: Intercepting SC status codes in Tomcat


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.


Mime
View raw message