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