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 /** path within a fragment hosted by a web-bundle to a folder that contains basic resources. 50 * the path is appended to the lookup path where jetty locates static resources */ 51 public static final String JETTY_WAR_FRAGMENT_FOLDER_PATH = "Jetty-WarFragmentFolderPath"; 52 53 /** path within a fragment hosted by a web-bundle to a folder that contains basic resources. 54 * The path is prefixed to the lookup path where jetty locates static resources: 55 * this will override static resources with the same name in the web-bundle. */ 56 public static final String JETTY_WAR_PATCH_FRAGMENT_FOLDER_PATH = "Jetty-WarPatchFragmentFolderPath"; 57 58 // OSGi ContextHandler service properties. 59 /** web app context path */ 60 public static final String SERVICE_PROP_CONTEXT_PATH = "contextPath"; 61 62 /** Path to the web application base folderr */ 63 public static final String SERVICE_PROP_WAR = "war"; 64 65 /** Extra classpath */ 66 public static final String SERVICE_PROP_EXTRA_CLASSPATH = "extraClasspath"; 67 68 /** jetty context file path */ 69 public static final String SERVICE_PROP_CONTEXT_FILE_PATH = "contextFilePath"; 70 71 /** web.xml file path */ 72 public static final String SERVICE_PROP_WEB_XML_PATH = "webXmlFilePath"; 73 74 /** defaultweb.xml file path */ 75 public static final String SERVICE_PROP_DEFAULT_WEB_XML_PATH = "defaultWebXmlFilePath"; 76 77 /** 78 * path to the base folder that overrides the computed bundle installation 79 * location if not null useful to install webapps or jetty context files 80 * that are in fact not embedded in a bundle 81 */ 82 public static final String SERVICE_PROP_BUNDLE_INSTALL_LOCATION_OVERRIDE = "thisBundleInstall"; 83 84 /** 85 * Comma separated list of bundles that contain tld file used by the webapp. 86 */ 87 public static final String REQUIRE_TLD_BUNDLE = "Require-TldBundle"; 88 /** 89 * Comma separated list of bundles that contain tld file used by the webapp. 90 * Both the name of the manifest header and the name of the service property. 91 */ 92 public static final String SERVICE_PROP_REQUIRE_TLD_BUNDLE = REQUIRE_TLD_BUNDLE; 93 }