projects.jspf revision 9158900bac6adc966217d308f9ddea9f5eb540c7
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen<%--
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner$Id$
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeCDDL HEADER START
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeThe contents of this file are subject to the terms of the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenCommon Development and Distribution License (the "License").
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeYou may not use this file except in compliance with the License.
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeSee LICENSE.txt included in this distribution for the specific
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyelanguage governing permissions and limitations under the License.
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeWhen distributing Covered Code, include this CDDL HEADER in each
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyefile and include the License file at LICENSE.txt.
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeIf applicable, add the following below this CDDL HEADER, with the
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyefields enclosed by brackets "[]" replaced with your own identifying
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyeinformation: Portions Copyright [yyyy] [name of copyright owner]
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeCDDL HEADER END
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9158900bac6adc966217d308f9ddea9f5eb540c7Kryštof TulingerCopyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerPortions Copyright 2011 Jens Elkner.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
9158900bac6adc966217d308f9ddea9f5eb540c7Kryštof Tulinger--%>
9158900bac6adc966217d308f9ddea9f5eb540c7Kryštof Tulinger<%@page import="
9158900bac6adc966217d308f9ddea9f5eb540c7Kryštof Tulingerjava.net.URLEncoder,
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerjava.util.TreeSet,
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerorg.opensolaris.opengrok.web.Prefix,
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerorg.opensolaris.opengrok.web.PageConfig,
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerorg.opensolaris.opengrok.configuration.Project
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner"%><%
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- projects.jspf start --------------------- */
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner{
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen // Use UTF-8 if no encoding is specified in the request
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen if (request.getCharacterEncoding() == null) {
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen request.setCharacterEncoding("UTF-8");
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen }
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen cfg = PageConfig.get(request);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen cfg.getEnv().setUrlPrefix(request.getContextPath() + Prefix.SEARCH_R + "?");
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen String projects = cfg.getRequestedProjectsAsString();
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen if (projects.length() != 0) {
9158900bac6adc966217d308f9ddea9f5eb540c7Kryštof Tulinger Cookie cookie = new Cookie(PageConfig.OPEN_GROK_PROJECT, URLEncoder.encode(projects, "utf-8"));
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen response.addCookie(cookie);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen }
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye}
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- projects.jspf end --------------------- */
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye%>