TrsWebErrorPage generates the default error page that is sent to a web browser when an exception occurs on the web tier.
The default error page displayed by the WebTier can be replaced by creating a descendant of TrsWebErrorPage and then specifying the value of the TrsWebTier.ErrorPageClass property
For example:
TrsWebTier.ErrorPageClass := TmyWebErrorPage;
To create a custom error page, descend from TrsWebErrorPage and override the CreateErrorPage method to generate the desired XHTML.}
TrsWebErrorPage = class private protected class procedure TokenizeCharStream(aStream: String; aTokens: TStringList); class function IsExceptionToken(aToken: String): Boolean; virtual; class function ErrorTemplateText: String; virtual; class function MaxSessionErrorTemplateText: String; virtual; class function ProcessMessage(aMessage: String): String; virtual;
public class function CreateErrorPage(aException: Exception): String; virtual; class function CreateWebLogErrorPage(aException: Exception): String; virtual; class function CreateMaxSessionErrorPage(aException: Exception): String; virtual;
Comments
---------------------------------------------------
Tech Tip: WebTier - Custom Error Page
---------------------------------------------------
TrsWebErrorPage generates the default error page that is sent to a web
browser when an exception occurs on the web tier.
The default error page displayed by the WebTier can be replaced by creating
a descendant of TrsWebErrorPage and then specifying the value of the
TrsWebTier.ErrorPageClass property
For example:
TrsWebTier.ErrorPageClass := TmyWebErrorPage;
To create a custom error page, descend from TrsWebErrorPage and override
the CreateErrorPage method to generate the desired XHTML.}
TrsWebErrorPage = class
private
protected
class procedure TokenizeCharStream(aStream: String; aTokens:
TStringList);
class function IsExceptionToken(aToken: String): Boolean; virtual;
class function ErrorTemplateText: String; virtual;
class function MaxSessionErrorTemplateText: String; virtual;
class function ProcessMessage(aMessage: String): String; virtual;
public
class function CreateErrorPage(aException: Exception): String;
virtual;
class function CreateWebLogErrorPage(aException: Exception): String;
virtual;
class function CreateMaxSessionErrorPage(aException: Exception):
String; virtual;
end;
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com