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