Class CommandServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.deltava.servlet.GenericServlet
org.deltava.servlet.CommandServlet
- All Implemented Interfaces:
Serializable
,Thread.UncaughtExceptionHandler
,Servlet
,ServletConfig
The main command controller. This is the application's brain stem.
- Since:
- 1.0
- Version:
- 11.3
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.servlet.GenericServlet
GenericServlet.ForbiddenException, GenericServlet.NotFoundException, GenericServlet.ServletSecurityContext
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
doGet
(HttpServletRequest req, HttpServletResponse rsp) GET request handler for this servlet.void
doPost
(HttpServletRequest req, HttpServletResponse rsp) POST request handler for this servlet.void
init()
Initializes the servlet.void
uncaughtException
(Thread t, Throwable e) Methods inherited from class org.deltava.servlet.GenericServlet
getURL
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
-
Field Details
-
_cmdLogPool
-
-
Constructor Details
-
CommandServlet
public CommandServlet()
-
-
Method Details
-
getServletInfo
- Specified by:
getServletInfo
in interfaceServlet
- Overrides:
getServletInfo
in classGenericServlet
-
init
Initializes the servlet. This loads the command map.- Overrides:
init
in classGenericServlet
- Throws:
ServletException
- if an error occurs- See Also:
-
destroy
public void destroy()- Specified by:
destroy
in interfaceServlet
- Overrides:
destroy
in classGenericServlet
-
doPost
public void doPost(HttpServletRequest req, HttpServletResponse rsp) throws IOException, ServletException POST request handler for this servlet. POST and GET requests are handled the same way.- Overrides:
doPost
in classHttpServlet
- Parameters:
req
- the HTTP requestrsp
- the HTTP response- Throws:
IOException
ServletException
- See Also:
-
doGet
public void doGet(HttpServletRequest req, HttpServletResponse rsp) throws IOException, ServletException GET request handler for this servlet.- Overrides:
doGet
in classHttpServlet
- Parameters:
req
- the servlet requestrsp
- the servlet response- Throws:
IOException
- if a network I/O error occursServletException
- if the error handler cannot forward to the error page
-
uncaughtException
- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-