1 // ======================================================================== 2 // Copyright (c) 2009 Intalio, Inc. 3 // ------------------------------------------------------------------------ 4 // All rights reserved. This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v1.0 6 // and Apache License v2.0 which accompanies this distribution. 7 // The Eclipse Public License is available at 8 // http://www.eclipse.org/legal/epl-v10.html 9 // The Apache License v2.0 is available at 10 // http://www.opensource.org/licenses/apache2.0.php 11 // You may elect to redistribute this code under either of these licenses. 12 // Contributors: 13 // Hugues Malphettes - initial API and implementation 14 // ======================================================================== 15 package org.eclipse.jetty.osgi.boot; 16 17 /** 18 * Name of the service properties for a ContextHandler that configure a webapp deployed on jetty OSGi. 19 */ 20 public class OSGiWebappConstants 21 { 22 /** url scheme to deploy war file as bundled webapp */ 23 public static final String RFC66_WAR_URL_SCHEME = "war"; 24 25 /** 26 * Name of the header that defines the context path for the embedded webapp. 27 */ 28 public static final String RFC66_WEB_CONTEXTPATH = "Web-ContextPath"; 29 30 /** 31 * Name of the header that defines the path to the folder where the jsp 32 * files are extracted. 33 */ 34 public static final String RFC66_JSP_EXTRACT_LOCATION = "Jsp-ExtractLocation"; 35 36 /** Name of the servlet context attribute that points to the bundle context. */ 37 public static final String RFC66_OSGI_BUNDLE_CONTEXT = "osgi-bundlecontext"; 38 39 /** Name of the servlet context attribute that points to the bundle object. 40 * We can't always rely on the bundle-context as there might be no such thing. */ 41 public static final String JETTY_OSGI_BUNDLE = "osgi-bundle"; 42 43 /** List of relative pathes within the bundle to the jetty context files. */ 44 public static final String JETTY_CONTEXT_FILE_PATH = "Jetty-ContextFilePath"; 45 46 /** path within the bundle to the folder that contains the basic resources. */ 47 public static final String JETTY_WAR_FOLDER_PATH = "Jetty-WarFolderPath"; 48 49 // OSGi ContextHandler service properties. 50 /** web app context path */ 51 public static final String SERVICE_PROP_CONTEXT_PATH = "contextPath"; 52 53 /** Path to the web application base folderr */ 54 public static final String SERVICE_PROP_WAR = "war"; 55 56 /** Extra classpath */ 57 public static final String SERVICE_PROP_EXTRA_CLASSPATH = "extraClasspath"; 58 59 /** jetty context file path */ 60 public static final String SERVICE_PROP_CONTEXT_FILE_PATH = "contextFilePath"; 61 62 /** web.xml file path */ 63 public static final String SERVICE_PROP_WEB_XML_PATH = "webXmlFilePath"; 64 65 /** defaultweb.xml file path */ 66 public static final String SERVICE_PROP_DEFAULT_WEB_XML_PATH = "defaultWebXmlFilePath"; 67 68 /** 69 * path to the base folder that overrides the computed bundle installation 70 * location if not null useful to install webapps or jetty context files 71 * that are in fact not embedded in a bundle 72 */ 73 public static final String SERVICE_PROP_BUNDLE_INSTALL_LOCATION_OVERRIDE = "thisBundleInstall"; 74 75 /** 76 * Comma separated list of bundles that contain tld file used by the webapp. 77 */ 78 public static final String REQUIRE_TLD_BUNDLE = "Require-TldBundle"; 79 /** 80 * Comma separated list of bundles that contain tld file used by the webapp. 81 * Both the name of the manifest header and the name of the service property. 82 */ 83 public static final String SERVICE_PROP_REQUIRE_TLD_BUNDLE = REQUIRE_TLD_BUNDLE; 84 }