This is a subclass of the {@link WebServer}, which offers a minimal servlet API. It is recommended to use this class, rather than the {@link WebServer}, because it offers you a smooth migration path to a full blown servlet engine.
Use of the {@link ServletWebServer} goes like this: First of all,create a servlet. It may be an instance of {@link XmlRpcServlet} ora subclass thereof. Note, that servlets are stateless: One servlet may be used by multiple threads (aka requests) concurrently. In other words, the servlet must not have any instance variables, other than those which are read only after the servlets initialization.
The XmlRpcServlet is by default using a property file named org/apache/xmlrpc/server/webserver/XmlRpcServlet.properties
. See the {@link PropertyHandlerMapping} for details on the propertyfile.
final int portNumber = 8088; ClassLoader cl = Thread.currentThread().getContextClassLoader(); XmlRpcServlet servlet = new XmlRpcServlet(); ServletWebServer webServer = new ServletWebServer(servlet, port); webServer.start();