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