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