org.mmbase.applications.dove.servlet
Class DoveServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.mmbase.servlet.MMBaseServlet
              extended byorg.mmbase.applications.dove.servlet.DoveServlet
All Implemented Interfaces:
MMBaseStarter, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DoveServlet
extends MMBaseServlet

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

Since:
MMBase-1.5
Version:
$Id: DoveServlet.java,v 1.11 2004/03/16 14:37:28 michiel Exp $
Author:
Pierre van Rooden
See Also:
Serialized Form

Nested Class Summary
 class DoveServlet.DoveErrorHandler
          Dove Error handler for catching and storing parsing exceptions.
 
Field Summary
 
Fields inherited from class org.mmbase.servlet.MMBaseServlet
mmbase, retryAfter
 
Constructor Summary
DoveServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles a request using the GET method.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles a request using the POST method.
 
Methods inherited from class org.mmbase.servlet.MMBaseServlet
associateMapping, checkInited, decRefCount, destroy, getAssociations, getMMBase, getRequestURL, getServletByAssociation, getServletByMapping, getServletInfo, getServletMappings, getServletMappingsByAssociation, incRefCount, init, service, setInitException, setMMBase
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoveServlet

public DoveServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.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.

Overrides:
doGet in class MMBaseServlet
Parameters:
req - the HTTP Request object
res - the HTTP Response object
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
Handles a request using the POST method. Retrieves the value of the 'xml' parameter, and parses the body 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 HTTP Request object
res - the HTTP Response object
Throws:
javax.servlet.ServletException
java.io.IOException


MMBase build 1.7.4.20050922