|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.xmlserv.main.ErrorPage
An errorpage using a simple XML document plus a XSL stylesheet to output the error message. The error code can be used to provide licalized error messages (not currently supported in this implementation).
Constructor Summary | |
ErrorPage()
Construct empty errorpage. |
|
ErrorPage(java.lang.String msg)
ErrorPage with a message string. |
|
ErrorPage(java.lang.String msg,
java.lang.String code)
ErrorPage with message and error code. |
|
ErrorPage(java.lang.String msg,
java.lang.String code,
java.lang.Exception e)
ErrorPage with message and code, additional info is taken from the given Exception |
Method Summary | |
org.jdom.transform.JDOMSource |
getErrorPage()
|
javax.xml.transform.Transformer |
getStylesheet(javax.servlet.ServletContext context)
Get the ErrorPage XSL Stylesheet. |
static void |
main(java.lang.String[] args)
Test routine. |
void |
printHTML(javax.servlet.ServletContext context,
java.io.PrintWriter outstream)
Convert error document to HTML and print to given PrintStream. |
javax.xml.transform.Source |
toDocument()
Create XML document from the error message and the error code. |
org.jdom.Element |
toElement()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ErrorPage()
public ErrorPage(java.lang.String msg)
msg
- The error message.public ErrorPage(java.lang.String msg, java.lang.String code)
msg
- The error message.code
- The error code.public ErrorPage(java.lang.String msg, java.lang.String code, java.lang.Exception e)
msg
- The error messagecode
- The error codee
- The Exception to describeMethod Detail |
public org.jdom.Element toElement()
public javax.xml.transform.Source toDocument()
public java.lang.String toString()
toString
in class java.lang.Object
public javax.xml.transform.Transformer getStylesheet(javax.servlet.ServletContext context) throws java.net.MalformedURLException, java.io.IOException, javax.xml.transform.TransformerConfigurationException
context
- The ServletContext used to locate the stylesheet.public void printHTML(javax.servlet.ServletContext context, java.io.PrintWriter outstream)
context
- The servlet context.outstream
- The outputstream to write to.public org.jdom.transform.JDOMSource getErrorPage()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |