I have registered a servlet through the IServerAccess method: registerWebService(String myServiceName, HttpServlet myServlet).
When I hit the URL <my-host>/servoy-service/myServiceName, The init method of my servlet is called (the first time), but the doGet method is never invoked.
I have overridden the following methods:
public void init() throws ServletException {
System.out.println("Servlet Initialized.");
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("Processing Request in MyServlet");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet</title>");
out.println("</head>");
out.println("<body>");
out.println("Servlet is working.");
out.println("</body>");
out.println("</html>");
out.close();
}
In the server terminal window I can see the print out 'Servlet Initialized.'
but no indication that the doGet method was ever called and the Browser is returned a blank html document . There are no exceptions reported on the server.
thanks,
Sean