Package com.appslandia.plum.base
Class ErrorServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.appslandia.plum.base.ErrorServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class ErrorServlet extends javax.servlet.http.HttpServlet- Author:
- Loc Ha
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AppConfigappConfigstatic StringCONFIG_ERROR_DEVprotected ExceptionHandlerexceptionHandlerprotected com.appslandia.common.json.JsonProcessorjsonProcessorprotected RequestContextParserrequestContextParser
-
Constructor Summary
Constructors Constructor Description ErrorServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voiddoOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voiddoPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected voiddoTrace(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected StringgetErrorJsp(javax.servlet.http.HttpServletRequest request, RequestContext requestContext)protected voidwriteErrorDev(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidwriteErrorProd(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)-
Methods inherited from class javax.servlet.http.HttpServlet
doHead, getLastModified, service, service
-
-
-
-
Field Detail
-
CONFIG_ERROR_DEV
public static final String CONFIG_ERROR_DEV
-
appConfig
@Inject protected AppConfig appConfig
-
exceptionHandler
@Inject protected ExceptionHandler exceptionHandler
-
requestContextParser
@Inject protected RequestContextParser requestContextParser
-
jsonProcessor
@Inject @Json(PRETTY_NULL) protected com.appslandia.common.json.JsonProcessor jsonProcessor
-
-
Method Detail
-
writeErrorProd
protected void writeErrorProd(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Throws:
javax.servlet.ServletExceptionIOException
-
getErrorJsp
protected String getErrorJsp(javax.servlet.http.HttpServletRequest request, RequestContext requestContext)
-
writeErrorDev
protected void writeErrorDev(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Throws:
javax.servlet.ServletExceptionIOException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doOptions
protected void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doOptionsin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPut
protected void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doPutin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doDelete
protected void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doDeletein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doTrace
protected void doTrace(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doTracein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
-