org.mmbase.applications.dove.servlet
Class DoveServlet

org.mmbase.servlet.JamesServlet
  |
  +--org.mmbase.applications.dove.servlet.DoveServlet

public class DoveServlet
extends JamesServlet

This servlet routes RPC requests (represented in xml) to the intended method of the 'Dove' object.

Version:
10 May 2001
Author:
Pierre van Rooden

Inner Class Summary
 class DoveServlet.DoveErrorHandler
          Dove Error handler for catching and storing parsing exceptions.
 
Constructor Summary
DoveServlet()
           
 
Method Summary
 void doGet(org.mmbase.applications.dove.servlet.HttpServletRequest req, org.mmbase.applications.dove.servlet.HttpServletResponse res)
          Handles a request using the GET method.
 void doPost(org.mmbase.applications.dove.servlet.HttpServletRequest req, org.mmbase.applications.dove.servlet.HttpServletResponse res)
          Handles a request using the POST method.
 
Methods inherited from class org.mmbase.servlet.JamesServlet
debug, decRefCount, finalize, getAddress, getAuthorization, getAuthorization, getCookie, getInitParameters, getModule, getParam, getParamVector, getProperties, getProperty, getRequestURL, incRefCount, init
 

Constructor Detail

DoveServlet

public DoveServlet()
Method Detail

doGet

public void doGet(org.mmbase.applications.dove.servlet.HttpServletRequest req,
                  org.mmbase.applications.dove.servlet.HttpServletResponse res)
           throws org.mmbase.servlet.ServletException,
                  java.io.IOException
Handles a request using the GET method. No communication is handled through GET - this method is for testing whether the servlet is online.
Parameters:
req - the HHTP Request object
res - the HHTP Response object

doPost

public void doPost(org.mmbase.applications.dove.servlet.HttpServletRequest req,
                   org.mmbase.applications.dove.servlet.HttpServletResponse res)
            throws org.mmbase.servlet.ServletException,
                   java.io.IOException
Handles a request using the POST method. Retrieves the value of the 'xml' parameter, and parses the bodfu of that parameter as an xml text. The resulting DOM tree is then passed to the Dove class, which runs the RPCs described in that tree. The result of Dove (also a DOM tree) is returned as xml to the client. The mime type of the result is 'text/xml', unless the 'plain' parameter is set to 'yes', in which case the mime type is 'text/plain'. Specifying a 'pretty' parameter with value 'yes' results in pretty printed xml. Both these parameters are ment for debugging.
XXX: Possibly we want to use xml directly in the body, instead of parameters.
XXX: Daniel suggested using CRC to validate calls. This is not implemented yet.
XXX: We have not yet established how we will use session-info and usercontext.
Parameters:
req - the HHTP Request object
res - the HHTP Response object


MMBase 2002