<%@ page session="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.io.*" import="java.util.*" import="org.apache.nutch.html.Entities" import="org.apache.nutch.searcher.*" import="org.apache.hadoop.conf.Configuration" import="org.apache.nutch.util.NutchConfiguration" %><% Configuration nutchConf = NutchConfiguration.get(application); NutchBean bean = NutchBean.get(application, nutchConf); // set the character encoding to use when interpreting request values request.setCharacterEncoding("UTF-8"); bean.LOG.info("anchors request from " + request.getRemoteAddr()); Hit hit = new Hit(Integer.parseInt(request.getParameter("idx")), Integer.parseInt(request.getParameter("id"))); HitDetails details = bean.getDetails(hit); String language = ResourceBundle.getBundle("org.nutch.jsp.anchors", request.getLocale()) .getLocale().getLanguage(); String requestURI = HttpUtils.getRequestURL(request).toString(); String base = requestURI.substring(0, requestURI.lastIndexOf('/')); %> <% // To prevent the character encoding declared with 'contentType' page // directive from being overriden by JSTL (apache i18n), we freeze it // by flushing the output buffer. // see http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/ out.flush(); %> <%@ taglib uri="http://jakarta.apache.org/taglibs/i18n" prefix="i18n" %> Nutch: <i18n:message key="title"/> "> "/>

"/>

    <% String[] anchors = bean.getAnchors(details); if (anchors != null) { for (int i = 0; i < anchors.length; i++) { %>
  • <%=Entities.encode(anchors[i])%> <% } %> <% } %>