The servlet responds to both HTTP GET and HTTP POST requests. Therefore, the servlet derives from rwsf::HttpServlet and overrides the doGet() and doPost() functions of rwsf::HttpServlet. The header for the SessionExample servlet follows:
// SessionExample.h #include <rwsf/servlet/http/HttpServlet.h> #include <rwsf/servlet/http/HttpServletRequest.h> #include <rwsf/servlet/http/HttpServletResponse.h> class SessionExample : public rwsf::HttpServlet { public: virtual void doGet(rwsf::HttpServletRequest& request, rwsf::HttpServletResponse& response); virtual void doPost(rwsf::HttpServletRequest& request, rwsf::HttpServletResponse& response); }; |
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.