1 <%-- 2 CDDL HEADER START 3 4 The contents of this file are subject to the terms of the 5 Common Development and Distribution License (the "License"). 6 You may not use this file except in compliance with the License. 7 8 See LICENSE.txt included in this distribution for the specific 9 language governing permissions and limitations under the License. 10 11 When distributing Covered Code, include this CDDL HEADER in each 12 file and include the License file at LICENSE.txt. 13 If applicable, add the following below this CDDL HEADER, with the 14 fields enclosed by brackets "[]" replaced with your own identifying 15 information: Portions Copyright [yyyy] [name of copyright owner] 16 17 CDDL HEADER END 18 19 Copyright 2005 Sun Microsystems, Inc. All rights reserved. 20 Use is subject to license terms. 21 22 ident "%Z%%M% %I% %E% SMI" 23 24 --%><%@ page import = "javax.servlet.*, 25 java.lang.*, 26 javax.servlet.http.*, 27 java.util.*, 28 java.io.*, 29 java.text.*, 30 org.opensolaris.opengrok.analysis.*, 31 org.opensolaris.opengrok.history.*, 32 org.opensolaris.opengrok.web.*, 33 org.opensolaris.opengrok.search.context.*, 34 java.util.regex.*, 35 org.apache.lucene.queryParser.*, 36 org.apache.lucene.search.*" 37 %><%@include file="mast.jsp"%><% 38 39 if (valid) { 40 String grepTerms = null; 41 if((grepTerms = request.getParameter("t")) != null && !grepTerms.equals("")) { 42 try{ 43 QueryParser qparser = new QueryParser("full", new CompatibleAnalyser()); 44 qparser.setDefaultOperator(QueryParser.AND_OPERATOR); 45 qparser.setAllowLeadingWildcard(environment.isAllowLeadingWildcard()); 46 Query tquery = qparser.parse(grepTerms); 47 if (tquery != null) { 48 Context sourceContext = new Context(tquery); 49 %><p><span class="pagetitle">Lines Matching <b><%=tquery%></b></span></p><div id="more" style="linespacing:1.5em;"><pre><% 50 sourceContext.getContext(new FileReader(resourceFile), out, context+"/xref", null, path ,null, false, null); 51 %></pre></div><% 52 } 53 } catch (Exception e) { 54 55 } 56 } 57 } 58 59 %><%@include file="foot.jspf"%> 60