opensearch.jsp revision d2b27f3d647af6fca607f14cb9296cc61c64b5b7
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCDDL HEADER START
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 KoscoSee LICENSE.txt included in this distribution for the specific
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscolanguage governing permissions and limitations under the License.
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 KoscoCDDL HEADER END
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoCopyright 2009 Sun Microsystems, Inc. All rights reserved.
30d2f45dd260208f0fb882dde134a249318524b9Lubos KoscoUse is subject to license terms.
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoident "%Z%%M% %I% %E% SMI"
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco--%><%@ page import = "java.util.List,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscoorg.opensolaris.opengrok.configuration.RuntimeEnvironment,
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco session="false" errorPage="error.jsp" %><%@ include file="projects.jspf" %><%
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 KoscoStringBuffer url = request.getRequestURL();
30d2f45dd260208f0fb882dde134a249318524b9Lubos Koscourl=url.delete(url.lastIndexOf("/"),url.length());
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco/* TODO Bug 11749
981e542f40f5acaf95b69c5854e5ffb080204242Lubos KoscoString proj="project=";
ff32508916722fc0e579f39b5bf22936116b8829Lubos KoscoString proj="";
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenStringBuilder text = new StringBuilder();
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlenboolean firstIteration = true;
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlenif (project != null) {
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlenfor (String tproj : project) {
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen if (!firstIteration) {
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco/* TODO Bug 11749
981e542f40f5acaf95b69c5854e5ffb080204242Lubos Kosco proj=proj + Util.URIEncode(tproj)+ ",";
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco proj = proj + "project=" + Util.URIEncode(tproj)+ "&";
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders Hatlen firstIteration = false;
d2b27f3d647af6fca607f14cb9296cc61c64b5b7Knut Anders HatlenString projtext = text.toString();
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco%><?xml version="1.0" encoding="UTF-8"?>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos Kosco<ShortName>OpenGrok <%=projtext%></ShortName>
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos Kosco<Description>Search in OpenGrok <%=projtext%></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"/>
9b1dea974e126ecb07a1f6d6cf9d2b637c8a47a0Lubos Kosco--%><Url template="<%=url%>/s?<%=proj%>q={searchTerms}&start={startPage?}" type="text/html"/>
30d2f45dd260208f0fb882dde134a249318524b9Lubos Kosco</OpenSearchDescription>