more.jsp revision 99
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<%--
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinThe contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCommon Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinYou may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinSee LICENSE.txt included in this distribution for the specific
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinlanguage governing permissions and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWhen distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinfile and include the License file at LICENSE.txt.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinIf applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinfields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininformation: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCopyright 2005 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUse is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin--%><%@ page import = "javax.servlet.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinjava.lang.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinjavax.servlet.http.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinjava.util.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinjava.io.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinjava.text.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinorg.opensolaris.opengrok.analysis.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinorg.opensolaris.opengrok.history.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinorg.opensolaris.opengrok.web.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinorg.opensolaris.opengrok.search.context.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinjava.util.regex.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinorg.apache.lucene.queryParser.*,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinorg.apache.lucene.search.*"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin%><%@include file="mast.jsp"%><%
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinif (valid) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin String grepTerms = null;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if((grepTerms = request.getParameter("t")) != null && !grepTerms.equals("")) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin try{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin QueryParser qparser = new QueryParser("full", new CompatibleAnalyser());
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin qparser.setDefaultOperator(QueryParser.AND_OPERATOR);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Query tquery = qparser.parse(grepTerms);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if (tquery != null) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Context sourceContext = new Context(tquery);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin %><p><span class="pagetitle">Lines Matching <b><%=tquery%></b></span></p><div id="more" style="linespacing:1.5em;"><pre><%
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sourceContext.getContext(new FileReader(resourceFile), out, context+"/xref", null, path ,null, false, null);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin %></pre></div><%
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin } catch (Exception e) {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin%><%@include file="foot.jspf"%>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin