public class ErrorServlet extends HttpServlet
| Constructor and Description |
|---|
ErrorServlet()Servlet for rendering error pages in webapps and plugins. |
| Modifier and Type | Method and Description |
|---|---|
protected String | _t(String s)translate a string, console bundle |
protected String | _t(String s,
Object o)translate a string, console bundle |
protected String | _t(String s,
Object o,
Object o2)translate a string, console bundle |
protected String | _w(String s)translate a string, with webapp bundle |
protected void | doGet(HttpServletRequest req,
HttpServletResponse resp)Handle GET request and render error page HTML. |
protected void | doPost(HttpServletRequest req,
HttpServletResponse resp)Needed if the errored page was a POST |
void | init()Load CSS path, webapp name, and bundle from init parameters. |
protected void | outputMessage(PrintWriter out,
int errorCode,
String errorMsg,
String errorURI,
Throwable errorCause)Override for specific cases. |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logpublic ErrorServlet()
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doGet in class HttpServletServletExceptionIOExceptionprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doPost in class HttpServletServletExceptionIOExceptionpublic void init()
throws ServletExceptioninit in class GenericServletServletExceptionprotected void outputMessage(PrintWriter out, int errorCode, String errorMsg, String errorURI, Throwable errorCause)
errorCode - e.g. 404errorMsg - non-null, may be empty, already HTML-escapederrorURI - non-null, may be empty, already HTML-escapederrorCause - may be null