<%@ page session="false" import="java.io.*" import="java.util.*" import="org.apache.nutch.searcher.*" import="org.apache.nutch.parse.ParseText" import="org.apache.hadoop.conf.Configuration" import="org.apache.nutch.util.NutchConfiguration" %><% // show the content of a hit as plain text Configuration nutchConf = NutchConfiguration.get(application); NutchBean bean = NutchBean.get(application, nutchConf); bean.LOG.info("text request from " + request.getRemoteAddr()); Hit hit = new Hit(Integer.parseInt(request.getParameter("idx")), Integer.parseInt(request.getParameter("id"))); HitDetails details = bean.getDetails(hit); String text = bean.getParseText(details).getText(); if (text.trim().equals("")) text = null; // 20041005, xing // This "CharEncodingForConversion" thing is only pertinent to // html parser (plugin parse-html) in current nutch. None of // other parser plugins are into it. So we worry it later. %>"> <% out.flush(); %> <%@ taglib uri="http://jakarta.apache.org/taglibs/i18n" prefix="i18n" %>

"/>
<% if (text != null) {%>
<%= text %>
<% } else { %> <% } %>