View Javadoc

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