|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.aoindustries.website.framework.ErrorReportingServlet
public abstract class ErrorReportingServlet
Any error occuring during servlet execution is reported to System.err.
Also keeps track of hit stastistics for doGet, doPost, and getLastModified methods.
| Field Summary | |
|---|---|
static int |
BUFFER_SIZE
The response buffer is set to this size. |
| Constructor Summary | |
|---|---|
protected |
ErrorReportingServlet(LoggerAccessor loggerAccessor)
|
| Method Summary | |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Any error that occurs during a doGet is caught and reported here. |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Any error that occurs during a doPost is caught and reported here. |
static long |
getGetCount()
Gets the number of GET requests that have been placed. |
protected long |
getLastModified(javax.servlet.http.HttpServletRequest req)
Any error that occurs during a getLastModified call is caught here. |
static long |
getLastModifiedCount()
Gets the number of calls to getLastModified. |
java.util.logging.Logger |
getLogger()
Gets the logger for this servlet. |
protected java.util.logging.Logger |
getLogger(java.lang.Class clazz)
Gets the logger for the provided class. |
protected java.util.logging.Logger |
getLogger(java.lang.String name)
Gets the provided named logger. |
protected LoggerAccessor |
getLoggerAccessor()
Gets the loggerAccess for this page. |
static long |
getPostCount()
Gets the number of POST requests that have been made. |
static long |
getUptime()
Gets the time the servlet environment was loaded. |
void |
log(java.lang.String message)
Deprecated. Please call logger directly for accurate class and method |
void |
log(java.lang.String message,
java.lang.Throwable err)
Deprecated. Please call logger directly for accurate class and method |
protected void |
reportingDoGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
protected void |
reportingDoPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
protected long |
reportingGetLastModified(javax.servlet.http.HttpServletRequest req)
|
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_SIZE
| Constructor Detail |
|---|
protected ErrorReportingServlet(LoggerAccessor loggerAccessor)
| Method Detail |
|---|
public static long getUptime()
protected LoggerAccessor getLoggerAccessor()
public java.util.logging.Logger getLogger()
protected java.util.logging.Logger getLogger(java.lang.Class clazz)
protected java.util.logging.Logger getLogger(java.lang.String name)
protected final void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doGet is caught and reported here.
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected final void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doPost is caught and reported here.
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOExceptionpublic static long getGetCount()
protected final long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified call is caught here.
getLastModified in class javax.servlet.http.HttpServletpublic static long getLastModifiedCount()
getLastModified.
public static long getPostCount()
protected void reportingDoGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.sql.SQLException,
java.io.IOException
javax.servlet.ServletException
java.sql.SQLException
java.io.IOExceptionHttpServlet.doGet(HttpServletRequest,HttpServletResponse)
protected void reportingDoPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.sql.SQLException,
java.io.IOException
javax.servlet.ServletException
java.sql.SQLException
java.io.IOExceptionHttpServlet.doPost(HttpServletRequest,HttpServletResponse)
protected long reportingGetLastModified(javax.servlet.http.HttpServletRequest req)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLExceptionHttpServlet.getLastModified(HttpServletRequest)@Deprecated public final void log(java.lang.String message)
log in class javax.servlet.GenericServlet
@Deprecated
public final void log(java.lang.String message,
java.lang.Throwable err)
log in class javax.servlet.GenericServlet
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||