org.mmbase.applications.dove.servlet
Class DoveServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.mmbase.servlet.MMBaseServlet
org.mmbase.applications.dove.servlet.DoveServlet
- All Implemented Interfaces:
- MMBaseStarter, Serializable, 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.12 2005/01/30 16:46:40 nico Exp $
- Author:
- Pierre van Rooden
- See Also:
- Serialized Form
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DoveServlet
public DoveServlet()
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
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 objectres - the HTTP Response object
- Throws:
ServletException
IOException
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
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 objectres - the HTTP Response object
- Throws:
ServletException
IOException
MMBase build 1.8.1.20060716