Author: pierre
Date: 2009-05-04 13:54:00 +0200 (Mon, 04 May 2009)
New Revision: 34926
Modified:
mmbase/branches/MMBase-1_8/applications/dove/src/org/mmbase/applications/dove/servlet/DoveServlet.java
Log:
reference to ErrorHandler is ambiguous
Modified:
mmbase/branches/MMBase-1_8/applications/dove/src/org/mmbase/applications/dove/servlet/DoveServlet.java
===================================================================
---
mmbase/branches/MMBase-1_8/applications/dove/src/org/mmbase/applications/dove/servlet/DoveServlet.java
2009-05-04 11:50:27 UTC (rev 34925)
+++
mmbase/branches/MMBase-1_8/applications/dove/src/org/mmbase/applications/dove/servlet/DoveServlet.java
2009-05-04 11:54:00 UTC (rev 34926)
@@ -1,11 +1,11 @@
/*
-
+
This software is OSI Certified Open Source Software.
OSI Certified is a certification mark of the Open Source Initiative.
-
+
The license (Mozilla version 1.0) can be read at the MMBase site.
See http://www.MMBase.org/license
-
+
*/
package org.mmbase.applications.dove.servlet;
@@ -36,7 +36,7 @@
* @version $Id: DoveServlet.java,v 1.12 2005-01-30 16:46:40 nico Exp $
*/
public class DoveServlet extends MMBaseServlet { // MMBase, only to be able to
use its logging
-
+
private static final Logger log =
Logging.getLoggerInstance(DoveServlet.class);
/**
@@ -48,13 +48,13 @@
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
PrintWriter out = res.getWriter();
-
+
res.setContentType("text/html");
out.println("<html><head><title>Dove</title></head>");
out.println("<body><h1>Dove RPC Router</h1>");
out.println("<p>The Dove servlet is active. use HTTP Post to send RPC
commands.</p></body></html>");
}
-
+
/**
* Handles a request using the POST method.
* Retrieves the value of the 'xml' parameter, and parses the body of that
@@ -83,8 +83,8 @@
boolean plain="yes".equals(req.getParameter("plain"));
try {
DoveErrorHandler errorhandler = new DoveErrorHandler();
- DocumentBuilder db =
XMLBasicReader.getDocumentBuilder(false,errorhandler);
-
+ DocumentBuilder db = XMLBasicReader.getDocumentBuilder(false,
errorhandler);
+
// Right now we read content from parameters
// Maybe we want the xml to be directly in the body?
// Depends on how the editors will post.
@@ -109,7 +109,7 @@
} else {
res.setContentType("text/xml");
}
-
+
BufferedWriter out=new BufferedWriter( new
OutputStreamWriter(res.getOutputStream()));
String content = XMLWriter.write(doc,pretty);
if (log.isDebugEnabled()){log.debug("sending : " +
content);}
@@ -136,25 +136,25 @@
out.println("<response><error type=\"" + errortype + "\">" + error +
"</error></response>");
out.flush();
}
-
+
/**
* Dove Error handler for catching and storing parsing exceptions.
* The Error handler catches all exceptions and stores their descriptions.
* These can then be retrieved by the Dove servlet, so it can generate an
* error response.
*/
- public class DoveErrorHandler implements ErrorHandler {
-
+ public class DoveErrorHandler implements org.xml.sax.ErrorHandler {
+
/**
* The errors that occurred during the parse.
*/
public String parsingerrors="";
-
+
/**
* Indicates whether any errors occurred.
*/
public boolean erroroccurred=false;
-
+
/**
* Logs an error and adds it to the list of parsing errors.
* @param ex the parsing exception describing the error
@@ -165,7 +165,7 @@
log.error(s);
parsingerrors=parsingerrors+s+"\n";
}
-
+
/**
* Logs a warning.
* Warnings are not added to the list of parsing errors.
@@ -174,7 +174,7 @@
public void warning(SAXParseException ex) {
log.warn(getErrorString(ex));
}
-
+
/**
* Logs a fatal error.
* Fatal errors are not added to the list of parsing errors, they
@@ -185,7 +185,7 @@
log.error("[Fatal Error] "+ getErrorString(ex));
throw ex;
}
-
+
/**
* Returns a string describing the error.
* @param ex the parsing exception describing the error
@@ -203,5 +203,5 @@
ex.getMessage();
}
}
-
+
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs