Serializable
, Servlet
, ServletConfig
public class ErrorServlet extends HttpServlet
Constructor | Description |
---|---|
ErrorServlet() |
Modifier and Type | Method | 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) |
|
void |
init() |
|
protected void |
outputMessage(PrintWriter out,
int errorCode,
String errorMsg,
String errorURI,
Throwable errorCause) |
Override for specific cases.
|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
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 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