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):
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:
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.
David Hancock | dhancock@... | 410-266-4384
From: Frank Barknecht [mailto:fbar@...]
Sent: Sunday, November 02, 2003 7:19 AM
Subject: [Webware-discuss] Customizing Exception pages
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...
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