projects.jspf revision 59b6a8c0cc6ef741a7180504b3c371e67c2aa338
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
52cdd45a95eb7c48af1c19ea6e401448a97545bfKnut Anders HatlenCopyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerPortions Copyright 2011 Jens Elkner.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner--%><%@page import="
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) {
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Cookie cookie = new Cookie("OpenGrokProject", projects);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen response.addCookie(cookie);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen }
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye}
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- projects.jspf end --------------------- */
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye%>