Source Code for HelloWorld Example

#include <sl/class_loader.hpp>
#include <sl/java.hpp>
#include <servlet/servlet_headers.h>
using namespace sl::java::io;
using namespace servlet;
using namespace servlet::http;

class HelloWorldExample : public HttpServlet {
public :
    void doGet(HttpServletRequest &request, HttpServletResponse &response)
        throw (ServletException)
    {
        response.setContentType("text/html;charset=ISO-8859-1");

        std::ostream& out = response.getWriter();
        out << "<html>" << std::endl;
        out << "<head>" << std::endl;
        out << "<title>Hello World!</title>" << std::endl;
        out << "</head>" << std::endl;
        out << "<body>" << std::endl;
        out << "<h1>Hello World!</h1>" << std::endl;
        out << "</body>" << std::endl;
        out << "</html>" << std::endl;
    }
};

SL_REGIST_LODABLE_CLASS(HelloWorldExample);