Writing Servlet Applications


Servlets

The classes Servlet::GenericServlet and its descendent Servlet::Http::HttpServlet are provided by the API as aids to servlet application developers. To build a custom HTTP servlet, simply create a subclass of Servlet::Http::HttpServlet and override the method/s of your choice (typically some combination of service(), doGet(), doPost(), etc). To build a servlet for another protocol, create a subclass of Servlet::GenericServlet and override service().

Filters

Event Listeners

Exceptions

Custom exceptions developed for a servlet application should inherit from Servlet::Util::Exception. Any exception caught by a servlet during processing should be wrapped in a Servlet::ServletException and re-thrown.