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:
- 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.6 2002/11/09 09:22:39 michiel Exp $
- Author:
- Pierre van Rooden
- See Also:
- Serialized Form
|
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. |
void |
init()
The init of an MMBaseServlet checks if MMBase is running. |
| Methods inherited from class org.mmbase.servlet.MMBaseServlet |
associateMapping, decRefCount, destroy, getAssociations, getRequestURL, getServletByAssociation, getServletByMapping, getServletInfo, getServletMappings, getServletMappingsByAssociation, incRefCount, service |
| 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 |
DoveServlet
public DoveServlet()
init
public void init()
throws javax.servlet.ServletException
- Description copied from class:
MMBaseServlet
- The init of an MMBaseServlet checks if MMBase is running. It not then it is started.
- Overrides:
init in class MMBaseServlet
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 objectres - the HTTP Response object
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 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.
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Parameters:
req - the HTTP Request objectres - the HTTP Response object
MMBase build 1.6.5.20030923