Package com.exedio.cops
Class CopsServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.exedio.cops.CopsServlet
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
- Direct Known Subclasses:
PropertiesServlet
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated.static final String
Deprecated.UseCharsetName.UTF8
instead -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
doGet
(HttpServletRequest request, HttpServletResponse response) protected final void
doPost
(HttpServletRequest request, HttpServletResponse response) protected abstract void
doRequest
(HttpServletRequest request, HttpServletResponse response) static final String
getAuthentication
(HttpServletRequest request) protected String
Returns the path all resources are available under.void
init
(ServletConfig config) final void
printException
(PrintStream out, Exception exception) final void
printException
(StringBuilder out, Exception exception) static final String
report
(HttpServletRequest request) final String
reportException
(Exception exception) Deprecated.UsereportException(HttpServletRequest, Exception)
instead.final String
reportException
(HttpServletRequest request, Exception exception) Returns the id under with the exception has been reported in the log.protected boolean
Overwrite this method (and return true) if your CopsServlet is not mounted at ".../*" and you know what you're doing.Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
ENCODING
Deprecated.UseCharsetName.UTF8
instead- See Also:
-
UTF8
Deprecated.UseCharsetName.UTF8
instead- See Also:
-
-
Constructor Details
-
CopsServlet
protected CopsServlet()
-
-
Method Details
-
init
- Specified by:
init
in interfaceServlet
- Overrides:
init
in classGenericServlet
- Throws:
ServletException
-
suppressPathCheck
protected boolean suppressPathCheck()Overwrite this method (and return true) if your CopsServlet is not mounted at ".../*" and you know what you're doing. -
getResourcesRootPath
Returns the path all resources are available under. The default implementation returns "resources". Must not return null or empty string. -
doGet
protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Overrides:
doGet
in classHttpServlet
- Throws:
ServletException
IOException
-
doPost
protected final void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Overrides:
doPost
in classHttpServlet
- Throws:
ServletException
IOException
-
doRequest
protected abstract void doRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Throws:
ServletException
IOException
-
getAuthentication
-
printException
-
printException
-
reportException
Returns the id under with the exception has been reported in the log. -
report
-
reportException
Deprecated.UsereportException(HttpServletRequest, Exception)
instead.
-
CharsetName.UTF8
instead