Add writeErrorReport() method for plain vanilla error pages.

This commit is contained in:
hns 2005-01-26 15:19:36 +00:00
parent 755a0f5606
commit 1c635f8b5c

View file

@ -443,6 +443,22 @@ public final class ResponseTrans implements Serializable {
response = what;
}
/**
* Write a vanilla error report. Callers should make sure the ResponeTrans is
* new or has been reset.
*
* @param appName the application name
* @param message the error message
*/
public void writeErrorReport(String appName, String message) {
write("<html><body><h3>");
write("Error in application ");
write(appName);
write("</h3>");
write(message);
write("</body></html>");
}
/**
* This has to be called after writing to this response has finished and before it is shipped back to the
* web server. Transforms the string buffer into a char array to minimize size.