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 2156f072caSAdam HornáčekCopyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. 220d40e9d0SAdam Hornáček 230d40e9d0SAdam HornáčekPortions Copyright 2011 Jens Elkner. 24e393cb49SAdam HornáčekPortions Copyright (c) 2018, Chris Fraire <cfraire@me.com>. 250d40e9d0SAdam Hornáček 260d40e9d0SAdam Hornáček--%> 270d40e9d0SAdam Hornáček<%@page import=" 280d40e9d0SAdam Hornáčekjava.net.URLEncoder, 29*d8a7afe2SAdam Hornacekorg.opengrok.web.PageConfig 300d40e9d0SAdam Hornáček"%><% 310d40e9d0SAdam Hornáček/* ---------------------- projects.jspf start --------------------- */ 320d40e9d0SAdam Hornáček{ 330d40e9d0SAdam Hornáček // Use UTF-8 if no encoding is specified in the request 340d40e9d0SAdam Hornáček if (request.getCharacterEncoding() == null) { 350d40e9d0SAdam Hornáček request.setCharacterEncoding("UTF-8"); 360d40e9d0SAdam Hornáček } 370d40e9d0SAdam Hornáček 380d40e9d0SAdam Hornáček PageConfig cfg = PageConfig.get(request); 390d40e9d0SAdam Hornáček 400d40e9d0SAdam Hornáček String projects = cfg.getRequestedProjectsAsString(); 410d40e9d0SAdam Hornáček if (projects.length() != 0) { 420d40e9d0SAdam Hornáček Cookie cookie = new Cookie(PageConfig.OPEN_GROK_PROJECT, URLEncoder.encode(projects, "utf-8")); 430d40e9d0SAdam Hornáček response.addCookie(cookie); 440d40e9d0SAdam Hornáček } 450d40e9d0SAdam Hornáček} 460d40e9d0SAdam Hornáček/* ---------------------- projects.jspf end --------------------- */ 470d40e9d0SAdam Hornáček%>