Update of /cvsroot/nutch/nutch/src/web/jsp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17521/src/web/jsp
Modified Files: search.jsp Added Files: more.jsp Log Message: Added plugin index-more, which makes a few meta info presentable (John Xing). --- NEW FILE: more.jsp --- <% // @author John Xing // show meta info (currently type, size, date of last-modified) // for each hit. These info are indexed by ./src/plugin/index-more. // do not show unless we have something boolean showMore = false; // Content-Type String primaryType = detail.getValue("primaryType"); String subType = detail.getValue("subType"); String contentType = subType; if (contentType == null) contentType = primaryType; if (contentType != null) { contentType = "[<font color=#0000ff>" + contentType + "</font>]"; showMore = true; } else { contentType = ""; } // Content-Length String contentLength = detail.getValue("contentLength"); if (contentLength != null) { contentLength = "(" + contentLength + " bytes)"; showMore = true; } else { contentLength = ""; } // Last-Modified String lastModified = detail.getValue("lastModified"); if (lastModified != null) { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(new Long(lastModified).longValue()); lastModified = cal.get(Calendar.YEAR) + "." + (1+cal.get(Calendar.MONTH)) // it is 0-based + "." + cal.get(Calendar.DAY_OF_MONTH); showMore = true; } else { lastModified = ""; } %> <% if (showMore) { %> <br><font size=-1><nobr><%=contentType%> <%=contentLength%> <%=lastModified%></nobr></font> <% } %> Index: search.jsp =================================================================== RCS file: /cvsroot/nutch/nutch/src/web/jsp/search.jsp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** search.jsp 10 Sep 2004 07:03:05 -0000 1.30 --- search.jsp 3 Oct 2004 22:23:31 -0000 1.31 *************** *** 181,187 **** title = url; %> ! <b> ! <a href="<%=url%>"><%=Entities.encode(title)%></a> ! </b> <% if (!"".equals(summary)) { %> <br><%=summary%> --- 181,186 ---- title = url; %> ! <b><a href="<%=url%>"><%=Entities.encode(title)%></a></b> ! <%@ include file="./more.jsp" %> <% if (!"".equals(summary)) { %> <br><%=summary%> ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Nutch-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nutch-cvs