opensearch.jsp revision 30d2f45dd260208f0fb882dde134a249318524b9
0N/A<%--
2362N/ACDDL HEADER START
0N/A
0N/AThe contents of this file are subject to the terms of the
0N/ACommon Development and Distribution License (the "License").
0N/AYou may not use this file except in compliance with the License.
2362N/A
0N/ASee LICENSE.txt included in this distribution for the specific
2362N/Alanguage governing permissions and limitations under the License.
0N/A
0N/AWhen distributing Covered Code, include this CDDL HEADER in each
0N/Afile and include the License file at LICENSE.txt.
0N/AIf applicable, add the following below this CDDL HEADER, with the
0N/Afields enclosed by brackets "[]" replaced with your own identifying
0N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
0N/A
0N/ACDDL HEADER END
0N/A
0N/ACopyright 2009 Sun Microsystems, Inc. All rights reserved.
0N/AUse is subject to license terms.
2362N/A
2362N/Aident "%Z%%M% %I% %E% SMI"
2362N/A
0N/A--%><%@ page import = "java.util.List,
0N/Ajavax.servlet.*,
0N/Ajavax.servlet.http.*,
0N/Aorg.opensolaris.opengrok.configuration.RuntimeEnvironment,
0N/Aorg.opensolaris.opengrok.configuration.Project,
0N/Aorg.opensolaris.opengrok.web.*"
0N/A session="false" errorPage="error.jsp" %><%@ include file="projects.jspf" %><%
0N/AString q = request.getParameter("q");
0N/AString defs = request.getParameter("defs");
0N/AString refs = request.getParameter("refs");
2157N/AString hist = request.getParameter("hist");
2157N/AString path = request.getParameter("path");
0N/ARuntimeEnvironment environment = RuntimeEnvironment.getInstance();
0N/AString Context = request.getContextPath();
0N/AString laf = environment.getWebappLAF();
0N/Aif (project == null) { "" : project; }
0N/AStringBuffer url = request.getRequestURL();
url=url.delete(url.lastIndexOf("/"),url.length());
%><?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>OpenGrok <%=project%></ShortName>
<Description>Search in OpenGrok <%=project%></Description>
<InputEncoding>UTF-8</InputEncoding>
<Image height="16" width="16" type="image/png"><%=url%>/<%=laf%>/img/icon.png</Image><%--
<Url type="application/x-suggestions+json" template="suggestionURL"/>
--%><%
if (project != "") {
project = "project=" + Util.URIEncode(project);
project = project + "&amp;";}
%><Url template="<%=url%>/s?<%=project%>q={searchTerms}&amp;start={startPage?}" type="text/html"/>
</OpenSearchDescription>