Registering a Servlet through the IServerAccess

Questions and answers on developing, deploying and using plugins and JavaBeans

Registering a Servlet through the IServerAccess

Postby sdevlin » Sat Nov 06, 2004 12:25 am

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
sdevlin
 
Posts: 125
Joined: Tue Apr 13, 2004 3:33 am

Postby jcompagner » Mon Nov 08, 2004 5:04 pm

can you send me the plugin that you are trying?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Plugins and Beans

Who is online

Users browsing this forum: Google [Bot] and 26 guests

cron