I won't profess to understanding exactly how this works, but one of our
developers did exactly what you're trying to do. We wanted to save and email
the full HTML "red-bar" traceback for oncall engineers, but we only wanted
users to see a short message with an identifying number so we could
correlate it on the system when they called in.

Here are the def statements from our ExceptionHandler; some override
corresponding default methods in Webware/WebKit.

    def __init__(self, application=None, transaction=None, excInfo=None):
    def work(self):
    def getPublicHTML(self):
    def getPrivateHTML(self):
    def getHTML(self):
    def errorPageFilename(self):
    def createRandomCode(self):
    def createTimeStamp(self):
    def createHTMLForDisplay(self):

The errorPageFilename uses a number returned by createRandomCode as part of
the filename. The date from createTimeStamp is also used for the filename,
so an error in servlet SomeFunc makes the file:

        Error-SomeFunc.py-01-Nov-03_15:09Z--11081.html

It uses getPublicHTML to construct the contents of that file.

The getPrivateHTML method is probably the one you're most interested in. It
constructs a much smaller, kinder, gentler page for the user to see (with
words like "We've encountered an error processing your request. If you need
immediate assistance call 1-800-BITEME. Please reference code: 12345 when
you call.  We're sorry for the inconvenience."

I hope this helps.

Cheers!
--
David Hancock | [EMAIL PROTECTED] | 410-266-4384


-----Original Message-----
From: Frank Barknecht [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 02, 2003 7:19 AM
To: [EMAIL PROTECTED]
Subject: [Webware-discuss] Customizing Exception pages


Hallo,

where should I start customizing the visual appearance of error pages?
Although I hope, that my users will never have to see them, if they do
I want them to look at something that fits into the design of my site.

I found Page.writeExceptionReport() but is this where such things
should be done? Does anyone have an example? I found nothing in the
Wiki on this topic...

ciao
-- 
 Frank Barknecht                               _ ______footils.org__


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to