Minnal C++ Servlet Container  1.7.0
Developed by Sans Pareil Technologies, Inc. (SPT)
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Minnal C++ Servlet Container

Contents

Overview

Minnal C++ Servlet Container is a medium performance C++ servlet container built using Poco HTTPServer implementation. Individual servlets for handling various paths are configured in a JEE standard web.xml file. The container (much like JEE web containers) handle the responsibility of routing the requests to the appropriate servlets based on the request URI and the serlvet-mapping configuration in web.xml

Implementation

The core classes that constitute the container are the following:

  • spt::servlet::ServletContainer is a standard Poco::Util::ServerApplication sub-class. It initialises a spt::servlet::RequestDispatcher instance, which takes over request handling.
  • spt::servlet::RequestDispatcher is an implementation of Poco::Net::HTTPRequestHandlerFactory. RequestDispatcher parses all virtualHost elements defined in the minnal.xml container configuration file and creates instances of for each virtual host configured. spt::servlet::VirtualHostServer is our implementation of Poco::Net::HTTPRequestHandlerFactory. The web.xml file is parsed and the servlet name to servlet configuration (path, initialisation parameters, context parameters etc) mapping is stored and used to route client requests to the appropriate spt::servlet::Servlet instance.
  • spt::servlet::Servlet class implements Poco::Net::AbstractHTTPRequestHandler. The base Servlet class implements the run() method and delegates to the appropriate doXxx method as JEE HTTPServlet does. The default implementation of the doXxx methods returns a HTTP_METHOD_NOT_IMPLEMENTED error. Sub-classes implement the appropriate doXxx methods.

Libraries

Minnal uses a few very popular libraries in its implementation. The major libraries used include:

  • Poco C++ Libraries (Boost Licence).
  • Xapian search engine library for site search (GPL).
  • PoDoFo for extracting text from PDF documents for search indexing (LGPL).
  • CTemplate templating engine for templated pages and content management. (New BSD licence)
  • C++ Template Unit Test Framework (TUT - BSD licence).
  • Qt - required for qmake only. The Qt API is not used in Minnal, although it is an excellent API. This may change in future, as we have succeeded in building a usable version of Qt using Oracle SolarisStudio compiler suite for Solaris 11, which is our deployment platform.