10d40e9d0SAdam Hornáček<%-- 20d40e9d0SAdam Hornáček$Id$ 30d40e9d0SAdam Hornáček 40d40e9d0SAdam HornáčekCDDL HEADER START 50d40e9d0SAdam Hornáček 60d40e9d0SAdam HornáčekThe contents of this file are subject to the terms of the 70d40e9d0SAdam HornáčekCommon Development and Distribution License (the "License"). 80d40e9d0SAdam HornáčekYou may not use this file except in compliance with the License. 90d40e9d0SAdam Hornáček 100d40e9d0SAdam HornáčekSee LICENSE.txt included in this distribution for the specific 110d40e9d0SAdam Hornáčeklanguage governing permissions and limitations under the License. 120d40e9d0SAdam Hornáček 130d40e9d0SAdam HornáčekWhen distributing Covered Code, include this CDDL HEADER in each 140d40e9d0SAdam Hornáčekfile and include the License file at LICENSE.txt. 150d40e9d0SAdam HornáčekIf applicable, add the following below this CDDL HEADER, with the 160d40e9d0SAdam Hornáčekfields enclosed by brackets "[]" replaced with your own identifying 170d40e9d0SAdam Hornáčekinformation: Portions Copyright [yyyy] [name of copyright owner] 180d40e9d0SAdam Hornáček 190d40e9d0SAdam HornáčekCDDL HEADER END 200d40e9d0SAdam Hornáček 21*56f072caSAdam HornáčekCopyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. 220d40e9d0SAdam Hornáček 230d40e9d0SAdam HornáčekPortions Copyright 2011 Jens Elkner. 240d40e9d0SAdam Hornáček 250d40e9d0SAdam Hornáček--%> 260d40e9d0SAdam Hornáček<%@page import=" 270d40e9d0SAdam Hornáčekjava.net.URLEncoder, 280d40e9d0SAdam Hornáčekjava.util.TreeSet, 290d40e9d0SAdam Hornáček 30*56f072caSAdam Hornáčekorg.opengrok.web.Prefix, 31*56f072caSAdam Hornáčekorg.opengrok.web.PageConfig, 32*56f072caSAdam Hornáčekorg.opengrok.configuration.Project 330d40e9d0SAdam Hornáček"%><% 340d40e9d0SAdam Hornáček/* ---------------------- projects.jspf start --------------------- */ 350d40e9d0SAdam Hornáček{ 360d40e9d0SAdam Hornáček // Use UTF-8 if no encoding is specified in the request 370d40e9d0SAdam Hornáček if (request.getCharacterEncoding() == null) { 380d40e9d0SAdam Hornáček request.setCharacterEncoding("UTF-8"); 390d40e9d0SAdam Hornáček } 400d40e9d0SAdam Hornáček 410d40e9d0SAdam Hornáček PageConfig cfg = PageConfig.get(request); 420d40e9d0SAdam Hornáček cfg.getEnv().setUrlPrefix(request.getContextPath() + Prefix.SEARCH_R + "?"); 430d40e9d0SAdam Hornáček 440d40e9d0SAdam Hornáček String projects = cfg.getRequestedProjectsAsString(); 450d40e9d0SAdam Hornáček if (projects.length() != 0) { 460d40e9d0SAdam Hornáček Cookie cookie = new Cookie(PageConfig.OPEN_GROK_PROJECT, URLEncoder.encode(projects, "utf-8")); 470d40e9d0SAdam Hornáček response.addCookie(cookie); 480d40e9d0SAdam Hornáček } 490d40e9d0SAdam Hornáček} 500d40e9d0SAdam Hornáček/* ---------------------- projects.jspf end --------------------- */ 510d40e9d0SAdam Hornáček%>