org.niggle.servlet
Class NiggleServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--org.niggle.servlet.NiggleServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public abstract class NiggleServlet
- extends javax.servlet.http.HttpServlet
The base Servlet class in the Niggle framework.
Note that this class defines very little
functionality. NiggleServlet delegates to 2
objects, NiggleConfig and ServletInteraction
- Author:
- Jonathan Revusky
- See Also:
NiggleConfig
,
ServletInteraction
,
Serialized Form
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
By default, a Niggle servlet treats a GET and a POST
identically. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method implements the top-level flow of
of control by which we handle a request. |
java.lang.String |
getServletInfo()
|
void |
init(javax.servlet.ServletConfig config)
Servlet initialization. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
niggleConfig
protected NiggleConfig niggleConfig
- The object that contains our servlet config info.
NiggleServlet
public NiggleServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Servlet initialization. This routine just hands
off to the NiggleConfig object that really
takes care of initializing the framework.
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
- thown if there is
some problem initializing this servlet. Servlet will
not be loaded.- See Also:
NiggleConfig
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- By default, a Niggle servlet treats a GET and a POST
identically. So this method, in this base class,
simply invokes doPost()
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
- See Also:
doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- This method implements the top-level flow of
of control by which we handle a request. Essentially,
we create a ServletInteraction object of the appropriate
type (we rely on the niggleConfig object to do this.)
Then we invoke the dispatch() method which carries
out the logic implicit in the request.
At the end, we invoke interaction.output()
in order to output a page as a result of the request.
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
getServletInfo
public java.lang.String getServletInfo()
- Specified by:
getServletInfo
in interface javax.servlet.Servlet
- Overrides:
getServletInfo
in class javax.servlet.GenericServlet