public class ErrorServlet extends HttpServlet
Constructor and Description |
---|
ErrorServlet() |
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) |
protected void |
doPost(HttpServletRequest req,
HttpServletResponse resp)
Needed if the errored page was a POST
|
void |
init() |
protected void |
outputMessage(PrintWriter out,
int errorCode,
String errorMsg,
String errorURI,
Throwable errorCause)
Override for specific cases.
|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public void init() throws ServletException
init
in class GenericServlet
ServletException
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doPost
in class HttpServlet
ServletException
IOException
protected 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