more.jsp revision 987
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslive<%--
013e1ddd21f2142a369c9a9a0eeb6c6a0bc3fcf3patrikjCDDL HEADER START
e942c741056732f50da2074b36fe59805d370650slive
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88ndThe contents of this file are subject to the terms of the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndCommon Development and Distribution License (the "License").
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndYou may not use this file except in compliance with the License.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
db479b48bd4d75423ed4a45e15b75089d1a8ad72fieldingSee LICENSE.txt included in this distribution for the specific
db479b48bd4d75423ed4a45e15b75089d1a8ad72fieldinglanguage governing permissions and limitations under the License.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
db479b48bd4d75423ed4a45e15b75089d1a8ad72fieldingWhen distributing Covered Code, include this CDDL HEADER in each
db479b48bd4d75423ed4a45e15b75089d1a8ad72fieldingfile and include the License file at LICENSE.txt.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndIf applicable, add the following below this CDDL HEADER, with the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndfields enclosed by brackets "[]" replaced with your own identifying
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndinformation: Portions Copyright [yyyy] [name of copyright owner]
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndCDDL HEADER END
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndCopyright 2010 Sun Microsystems, Inc. All rights reserved.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndUse is subject to license terms.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd--%><%@ page import = "javax.servlet.*,
7db9f691a00ead175b03335457ca296a33ddf31bndjava.lang.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslivejavax.servlet.http.*,
5f18f92c1354462df6dc2ba38277a953fa700b13gryzorjava.util.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslivejava.io.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslivejava.text.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfsliveorg.opensolaris.opengrok.analysis.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfsliveorg.opensolaris.opengrok.history.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfsliveorg.opensolaris.opengrok.web.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfsliveorg.opensolaris.opengrok.search.context.*,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfsliveorg.opensolaris.opengrok.search.QueryBuilder,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfsliveorg.opensolaris.opengrok.search.SearchEngine,
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslivejava.util.regex.*,
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirinorg.apache.lucene.queryParser.*,
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirinorg.apache.lucene.search.*"
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin%><%@include file="mast.jsp"%><%
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirinif (valid) {
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin QueryBuilder qbuilder = new QueryBuilder()
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin .setFreetext(request.getParameter("full"))
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin .setDefs(request.getParameter("defs"))
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin .setRefs(request.getParameter("refs"))
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin .setPath(request.getParameter("path"))
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin .setHist(request.getParameter("hist"));
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin // This is for backward compatibility with links created by OpenGrok 0.8.x
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin // and earlier. We used to concatenate the entire query into a single
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin // string and send it in the t parameter. If we get such a link, just add
f6445f3ad1c82f9398dc8edd77093cd3e20b806cnoirin // it to the freetext field, and we'll get the old behaviour. We can
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslive // probably remove this code in the first feature release after 0.9.
f0a393c5c2d7de58f447855369ad2fbfa254e544rbowen String t = request.getParameter("t");
f0a393c5c2d7de58f447855369ad2fbfa254e544rbowen if (t != null) {
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslive qbuilder.setFreetext(t);
1c47b0c72c991a6f0ad172c74df0936fe13d6fbfslive }
7571ea383299910bead3e93e66246cb212a28d0figalic
bc36e90829b1ee123307a2339519265139a88173sf try {
bc36e90829b1ee123307a2339519265139a88173sf Query tquery = qbuilder.build();
bc36e90829b1ee123307a2339519265139a88173sf if (tquery != null) {
bc36e90829b1ee123307a2339519265139a88173sf Context sourceContext = new Context(tquery, qbuilder.getQueries());
bc36e90829b1ee123307a2339519265139a88173sf %><p><span class="pagetitle">Lines Matching <b><%=tquery%></b></span></p><div id="more" style="line-height:1.5em;"><pre><%
bc36e90829b1ee123307a2339519265139a88173sf sourceContext.getContext(new FileReader(resourceFile), out, context+"/xref", null, path, null, false, null);
bc36e90829b1ee123307a2339519265139a88173sf %></pre></div><%
bc36e90829b1ee123307a2339519265139a88173sf }
bc36e90829b1ee123307a2339519265139a88173sf } catch (Exception e) {
bc36e90829b1ee123307a2339519265139a88173sf
bc36e90829b1ee123307a2339519265139a88173sf }
1f0a28764a0520e43ce3a9130e56236fd67cd568igalic}
bc36e90829b1ee123307a2339519265139a88173sf
bc36e90829b1ee123307a2339519265139a88173sf%><%@include file="foot.jspf"%>
bc36e90829b1ee123307a2339519265139a88173sf