Deriving from rwsf::HttpServlet
An HTTP servlet handles standard HTTP requests. Although HydraExpress contains a generic servlet class, in practice, most servlets provide Web services or deliver content to Web browsers. Therefore, most servlets derive from rwsf::HttpServlet.
The
HelloWorldExample servlet receives an HTTP
GET request from a client and returns a fixed response. The sample below shows the outline of the
HelloWorldExample servlet class, without methods which are discussed in
Implementing Request Handlers.
// Simplified from HelloWorldExample.h
#include <rwsf/servlet/http/HttpServlet.h>
class HelloWorldExample : public rwsf::HttpServlet {
};