<%@ page import="org.apache.log4j.*" %> <%@ page import="com.ecyrd.jspwiki.*" %> <%@ page import="java.util.*" %> <%! public void jspInit() { wiki = WikiEngine.getInstance( getServletConfig() ); } Category log = Category.getInstance("JSPWikiSearch"); WikiEngine wiki; %> <% String pagereq = "UndefinedPages"; NDC.push( wiki.getApplicationName()+": Search" ); String pageurl = wiki.encodeName( pagereq ); String query = wiki.safeGetParameter( request, "query"); Collection list = null; response.setContentType("text/html; charset="+wiki.getContentEncoding() ); if( query != null ) { log.info("Searching for string "+query); list = wiki.findPages( query ); log.info("Found "+list.size()+" pages"); } %> <%=wiki.getApplicationName()%> Search <%@ include file="cssinclude.js" %>
<%@ include file="LeftMenu.jsp" %>

<%@ include file="LeftMenuFooter.jsp" %>

Find pages

<% if( list != null ) { %>

Search results for '<%=query%>'

<% if( list.size() > 0 ) { for( Iterator i = list.iterator(); i.hasNext(); ) { SearchResult pageref = (SearchResult) i.next(); %> <% } } else { %> <% } %>
Page Score
<%=pageref.getName()%> <%=pageref.getScore()%>
No results

Try this same search on Google!


<% } %>

Enter your query here:

Use '+' to require a word, '-' to forbid a word. For example:

          +java -emacs jsp
      
finds pages that MUST include the word "java", and MAY NOT include the word "emacs". Also, pages that contain the word "jsp" are ranked before the pages that don't.

All searches are case insensitive. If a page contains both forbidden and required keywords, it is not shown.

<% NDC.pop(); NDC.remove(); %>