opensearch.jsp revision 1478
123N/ASee LICENSE.txt included in this distribution for the specific
123N/Afile and include the License file at LICENSE.txt.
123N/Ainclude file="pageconfig.jspf"
123N/Ainclude file="projects.jspf"
123N/A /* ---------------------- opensearch.jsp start --------------------- */
123N/A cfg = PageConfig.get(request);
123N/A String ForwardedHost = request.getHeader("X-Forwarded-Host");
123N/A String scheme = request.getScheme();
123N/A int port = request.getServerPort();
123N/A url.append(scheme).append("://");
123N/A url.append(ForwardedHost);
123N/A if ((port != 80 && scheme.equals("http")) ||
123N/A (port != 443 && scheme.equals("https"))) {
123N/A url.append(':').append(port);
Set<String> projects = cfg.getRequestedProjects();
text.append(name).append(',');
Util.appendQuery(url, "project", name);
if (text.length() != 0) {
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>OpenGrok <%= text.toString() %></ShortName>
<Description>Search in OpenGrok <%= text.toString() %></Description>
<Image height="16" width="16" type="image/png"><%= imgurl %></Image>
<%-- <Url type="application/x-suggestions+json" template="suggestionURL"/>--%>
/* ---------------------- opensearch.jsp end --------------------- */