Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-200 fix servlet init method

Sami Siren0bea9ef47a6e
diff --git a/src/java/org/apache/nutch/searcher/OpenSearchServlet.java b/src/java/org/apache/nutch/searcher/OpenSearchServlet.java
index 4bd31bf0a..5ec156bfa 100644
--- a/src/java/org/apache/nutch/searcher/OpenSearchServlet.java
+++ b/src/java/org/apache/nutch/searcher/OpenSearchServlet.java
@@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.*;
import org.apache.hadoop.conf.Configuration;
+import org.apache.nutch.util.NutchConfiguration;
import org.w3c.dom.*;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
@@ -59,10 +60,10 @@ public class OpenSearchServlet extends HttpServlet {
private NutchBean bean;
private Configuration conf;
- public void init(ServletConfig config, Configuration conf) throws ServletException {
+ public void init(ServletConfig config) throws ServletException {
try {
- bean = NutchBean.get(config.getServletContext(), conf);
- this.conf = conf;
+ this.conf = NutchConfiguration.create();
+ bean = NutchBean.get(config.getServletContext(), this.conf);
} catch (IOException e) {
throw new ServletException(e);
}