|
|||||||||
| 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.getsnappy.snappyj.ApplicationInstance
public abstract class ApplicationInstance
This class as a wrapper around HttpServlet is slightly more convenient and plays nicer with Eclipse than the HttpServlet class. This class is strictly optional, but I find the error handling mechanisms quite useful.
| Constructor Summary | |
|---|---|
ApplicationInstance()
|
|
| Method Summary | |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
simply forward to the output function and turn exceptions that are not already of type IOException or ServletException into ServletExceptions before passing them back out. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
simply forward to the output function and turn exceptions that are not already of type IOException or ServletException into ServletExceptions before passing them back out. |
abstract void |
output(java.io.Writer out,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This abstract class must be overriden and is called whenever this servlet is excecuted. |
void |
setApplicationErrorHandler(ApplicationErrorHandler error)
Specify an alternate error handler. |
| 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, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationInstance()
| Method Detail |
|---|
public void setApplicationErrorHandler(ApplicationErrorHandler error)
error - is the new ApplicationErrorHandler
public abstract void output(java.io.Writer out,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
out - request - response -
java.lang.Exception
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletjava.io.IOException
javax.servlet.ServletException
public final void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doPost in class javax.servlet.http.HttpServletjava.io.IOException
javax.servlet.ServletException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||