Custom JSP tag. Provides a generic support for your error pages.
Tag showError will print error message and an appropriate stack on your error page. So
a typical error page for your application may looks so:
<%@ page isErrorPage="true" %> <%@ taglib uri="taglib.tld" prefix="ex" %> <ex:showError /> Tag dumpError lets you save error info as well as user specified data
to some file. For example, in your web.xml file you may set the following
definition for error page:
<error-page> <exception-type>java.lang.Exception</exception-type> <location>myErrorPage.jsp</location> </error-page> and myErrorPage.jsp will log error related data:
<%@ taglib uri="taglib.tld" prefix="ex" %> <ex:dumpError file="c:/errors.txt" stack="true" headers="true" parameters="true"/> Tags are: showError Prints error message and stack. Parameters are: 1) id Optional parameter. Describes a page scope variable for data (type is java.lang.String). Without this parameter tag just prints data. dumpError Prints error info to the given file. Parameters are: 1) file Optional parameter. Describes a file for your log.
By default tag will use system log.
for downloading: Library: errortag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|