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