opensearch.jsp revision 30d2f45dd260208f0fb882dde134a249318524b9
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<%--
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCDDL HEADER START
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoThe contents of this file are subject to the terms of the
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCommon Development and Distribution License (the "License").
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoYou may not use this file except in compliance with the License.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoSee LICENSE.txt included in this distribution for the specific
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscolanguage governing permissions and limitations under the License.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoWhen distributing Covered Code, include this CDDL HEADER in each
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscofile and include the License file at LICENSE.txt.
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoIf applicable, add the following below this CDDL HEADER, with the
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscofields enclosed by brackets "[]" replaced with your own identifying
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoinformation: Portions Copyright [yyyy] [name of copyright owner]
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCDDL HEADER END
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCopyright 2009 Sun Microsystems, Inc. All rights reserved.
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoUse is subject to license terms.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoident "%Z%%M% %I% %E% SMI"
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco--%><%@ page import = "java.util.List,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscojavax.servlet.*,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscojavax.servlet.http.*,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoorg.opensolaris.opengrok.configuration.RuntimeEnvironment,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoorg.opensolaris.opengrok.configuration.Project,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoorg.opensolaris.opengrok.web.*"
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco session="false" errorPage="error.jsp" %><%@ include file="projects.jspf" %><%
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString q = request.getParameter("q");
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString defs = request.getParameter("defs");
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString refs = request.getParameter("refs");
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString hist = request.getParameter("hist");
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString path = request.getParameter("path");
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoRuntimeEnvironment environment = RuntimeEnvironment.getInstance();
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString Context = request.getContextPath();
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoString laf = environment.getWebappLAF();
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoif (project == null) { "" : project; }
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoStringBuffer url = request.getRequestURL();
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscourl=url.delete(url.lastIndexOf("/"),url.length());
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco%><?xml version="1.0" encoding="UTF-8"?>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<ShortName>OpenGrok <%=project%></ShortName>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<Description>Search in OpenGrok <%=project%></Description>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<InputEncoding>UTF-8</InputEncoding>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<Image height="16" width="16" type="image/png"><%=url%>/<%=laf%>/img/icon.png</Image><%--
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<Url type="application/x-suggestions+json" template="suggestionURL"/>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco--%><%
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoif (project != "") {
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoproject = "project=" + Util.URIEncode(project);
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoproject = project + "&amp;";}
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco%><Url template="<%=url%>/s?<%=project%>q={searchTerms}&amp;start={startPage?}" type="text/html"/>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco</OpenSearchDescription>