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 Section 3.4.
// Simplified from HelloWorldExample.h #include <rwsf/servlet/http/HttpServlet.h> class HelloWorldExample : public rwsf::HttpServlet { }; |
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.