more.jsp revision 4aabae02a84501165f3a1375bd3610db1b222ce3
303N/A<%--
303N/ACDDL HEADER START
303N/A
303N/AThe contents of this file are subject to the terms of the
303N/ACommon Development and Distribution License (the "License").
303N/AYou may not use this file except in compliance with the License.
303N/A
303N/ASee LICENSE.txt included in this distribution for the specific
303N/Alanguage governing permissions and limitations under the License.
303N/A
303N/AWhen distributing Covered Code, include this CDDL HEADER in each
303N/Afile and include the License file at LICENSE.txt.
303N/AIf applicable, add the following below this CDDL HEADER, with the
303N/Afields enclosed by brackets "[]" replaced with your own identifying
303N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
303N/A
303N/ACDDL HEADER END
303N/A
303N/ACopyright 2010 Sun Microsystems, Inc. All rights reserved.
303N/AUse is subject to license terms.
303N/A
303N/A--%><%@ page import = "javax.servlet.*,
303N/Ajava.lang.*,
303N/Ajavax.servlet.http.*,
303N/Ajava.util.*,
303N/Ajava.io.*,
303N/Ajava.text.*,
303N/Aorg.opensolaris.opengrok.analysis.*,
303N/Aorg.opensolaris.opengrok.history.*,
303N/Aorg.opensolaris.opengrok.web.*,
303N/Aorg.opensolaris.opengrok.search.context.*,
303N/Aorg.opensolaris.opengrok.search.SearchEngine,
303N/Ajava.util.regex.*,
303N/Aorg.apache.lucene.queryParser.*,
303N/Aorg.apache.lucene.search.*"
303N/A%><%@include file="mast.jsp"%><%
303N/A
303N/Aif (valid) {
303N/A String grepTerms = null;
303N/A if((grepTerms = request.getParameter("t")) != null && !grepTerms.equals("")) {
303N/A try{
303N/A QueryParser qparser = new QueryParser(SearchEngine.LUCENE_VERSION,"full", new CompatibleAnalyser());
303N/A qparser.setDefaultOperator(QueryParser.AND_OPERATOR);
303N/A qparser.setAllowLeadingWildcard(environment.isAllowLeadingWildcard());
303N/A Query tquery = qparser.parse(grepTerms);
303N/A if (tquery != null) {
303N/A Context sourceContext = new Context(tquery);
303N/A %><p><span class="pagetitle">Lines Matching <b><%=tquery%></b></span></p><div id="more" style="line-height:1.5em;"><pre><%
303N/A sourceContext.getContext(new FileReader(resourceFile), out, context+"/xref", null, path ,null, false, null);
303N/A %></pre></div><%
303N/A }
303N/A } catch (Exception e) {
303N/A
303N/A }
303N/A }
303N/A}
303N/A
303N/A%><%@include file="foot.jspf"%>
303N/A