otis 02/04/01 21:15:43 Modified: src/jsp results.jsp Log: - Applied Mark Hayes' patch to avoid NPE. Revision Changes Path 1.2 +5 -5 jakarta-lucene/src/jsp/results.jsp Index: results.jsp =================================================================== RCS file: /home/cvs/jakarta-lucene/src/jsp/results.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- results.jsp 26 Jan 2002 15:01:32 -0000 1.1 +++ results.jsp 2 Apr 2002 05:15:43 -0000 1.2 @@ -110,12 +110,12 @@ %> <tr> <% - Document doc = hits.doc(i); //get the next document - String doctitle = doc.get("title"); //get its title - String url = doc.get("url"); //get its url field - if (doctitle.equals("")) //use the url if it has no title + Document doc = hits.doc(i); //get the next document + String doctitle = doc.get("title"); //get its title + String url = doc.get("url"); //get its url field + if ((doctitle == null) || doctitle.equals("")) //use the url if it has no title doctitle = url; - //then output! + //then output! %> <td><a href="<%=url%>"><%=doctitle%></a></td> <td><%=doc.get("summary")%></td>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>