View Javadoc

1   //
2   //  ========================================================================
3   //  Copyright (c) 1995-2013 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      /** service property osgi.web.symbolicname. See OSGi r4 */
27      public static final String OSGI_WEB_SYMBOLICNAME = "osgi.web.symbolicname";
28      
29      /** service property osgi.web.symbolicname. See OSGi r4 */
30      public static final String OSGI_WEB_VERSION = "osgi.web.version";
31      
32      /** service property osgi.web.contextpath. See OSGi r4 */
33      public static final String OSGI_WEB_CONTEXTPATH = "osgi.web.contextpath";
34      
35      /** See OSGi r4 p.427 */
36      public static final String OSGI_BUNDLECONTEXT = "osgi-bundlecontext";
37  
38      
39  
40      /** url scheme to deploy war file as bundled webapp */
41      public static final String RFC66_WAR_URL_SCHEME = "war";
42  
43      /**
44       * Name of the header that defines the context path for the embedded webapp.
45       */
46      public static final String RFC66_WEB_CONTEXTPATH = "Web-ContextPath";
47  
48      /**
49       * Name of the header that defines the path to the folder where the jsp
50       * files are extracted.
51       */
52      public static final String RFC66_JSP_EXTRACT_LOCATION = "Jsp-ExtractLocation";
53  
54      /** Name of the servlet context attribute that points to the bundle context. */
55      public static final String RFC66_OSGI_BUNDLE_CONTEXT = "osgi-bundlecontext";
56  
57      /** Name of the servlet context attribute that points to the bundle object.
58       * We can't always rely on the bundle-context as there might be no such thing. */
59      public static final String JETTY_OSGI_BUNDLE = "osgi-bundle";
60  
61      /** List of relative pathes within the bundle to the jetty context files. */
62      public static final String JETTY_CONTEXT_FILE_PATH = "Jetty-ContextFilePath";
63  
64      /** path within the bundle to the folder that contains the basic resources. */
65      public static final String JETTY_WAR_FOLDER_PATH = "Jetty-WarFolderPath";
66  
67      /** path within a fragment hosted by a web-bundle to a folder that contains basic resources.
68       * the path is appended to the lookup path where jetty locates static resources */
69      public static final String JETTY_WAR_FRAGMENT_FOLDER_PATH = "Jetty-WarFragmentFolderPath";
70  
71      /** path within a fragment hosted by a web-bundle to a folder that contains basic resources.
72       * The path is prefixed to the lookup path where jetty locates static resources:
73       * this will override static resources with the same name in the web-bundle. */
74      public static final String JETTY_WAR_PATCH_FRAGMENT_FOLDER_PATH = "Jetty-WarPatchFragmentFolderPath";
75  
76    
77      /** 
78       * web app context path 
79       * @deprecated see RFC66_WEB_CONTEXTPATH
80       */
81      public static final String SERVICE_PROP_CONTEXT_PATH = "contextPath";
82  
83      
84      /** 
85       * Path to the web application base folder 
86       * @deprecated see JETTY_WAR_FOLDER_PATH
87       */
88      public static final String SERVICE_PROP_WAR = "war";
89  
90      /** 
91       * Extra classpath
92       * @deprecated see JETTY_EXTRA_CLASSPATH 
93       */
94      public static final String SERVICE_PROP_EXTRA_CLASSPATH = "extraClasspath";
95      
96      public static final String JETTY_EXTRA_CLASSPATH = "Jetty-extraClasspath";
97  
98      /** 
99       * jetty context file path 
100      * @deprecated see JETTY_CONTEXT_FILE_PATH
101      */
102     public static final String SERVICE_PROP_CONTEXT_FILE_PATH = "contextFilePath";
103 
104     /** 
105      * web.xml file path 
106      * @deprecated see JETTY_WEB_XML_PATH
107      */
108     public static final String SERVICE_PROP_WEB_XML_PATH = "webXmlFilePath";
109     
110     public static final String JETTY_WEB_XML_PATH = "Jetty-WebXmlFilePath";
111 
112     /** 
113      * defaultweb.xml file path 
114      * @deprecated see JETTY_DEFAULT_WEB_XML_PATH
115      */
116     public static final String SERVICE_PROP_DEFAULT_WEB_XML_PATH = "defaultWebXmlFilePath";
117     
118     public static final String JETTY_DEFAULT_WEB_XML_PATH = "Jetty-defaultWebXmlFilePath";
119 
120     /**
121      * path to the base folder that overrides the computed bundle installation
122      * location if not null useful to install webapps or jetty context files
123      * that are in fact not embedded in a bundle
124      * @deprecated see JETTY_BUNDLE_INSTALL_LOCATION_OVERRIDE
125      */
126     public static final String SERVICE_PROP_BUNDLE_INSTALL_LOCATION_OVERRIDE = "thisBundleInstall";
127     
128     public static final String JETTY_BUNDLE_INSTALL_LOCATION_OVERRIDE = "Jetty-bundleInstall";
129     
130     /**
131      * Comma separated list of bundles that contain tld file used by the webapp.
132      */
133     public static final String REQUIRE_TLD_BUNDLE = "Require-TldBundle";
134     /**
135      * Comma separated list of bundles that contain tld file used by the webapp.
136      * Both the name of the manifest header and the name of the service property.
137      */
138     public static final String SERVICE_PROP_REQUIRE_TLD_BUNDLE = REQUIRE_TLD_BUNDLE;
139     
140     public static final String WATERMARK = "o.e.j.o.b.watermark";
141     
142     /**
143      * Set of extra dirs that must not be served by osgi webapps
144      */
145     public static final String[] DEFAULT_PROTECTED_OSGI_TARGETS = {"/osgi-inf", "/osgi-opts"};
146 
147     
148     
149 }