Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e97457aecdf13f53122620433e738b8acb84b882 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//
//  ========================================================================
//  Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd.
//  ------------------------------------------------------------------------
//  All rights reserved. This program and the accompanying materials
//  are made available under the terms of the Eclipse Public License v1.0
//  and Apache License v2.0 which accompanies this distribution.
//
//      The Eclipse Public License is available at
//      http://www.eclipse.org/legal/epl-v10.html
//
//      The Apache License v2.0 is available at
//      http://www.opensource.org/licenses/apache2.0.php
//
//  You may elect to redistribute this code under either of these licenses.
//  ========================================================================
//

package org.eclipse.jetty.osgi.boot;

/**
 * OSGiWebappConstants
 * 
 * 
 * Constants (MANIFEST headers, service properties etc) associated with deploying
 * webapps into OSGi via Jetty.
 * 
 */
public class OSGiWebappConstants
{
    /** service property osgi.web.symbolicname. See OSGi r4 */
    public static final String OSGI_WEB_SYMBOLICNAME = "osgi.web.symbolicname";
    
    /** service property osgi.web.symbolicname. See OSGi r4 */
    public static final String OSGI_WEB_VERSION = "osgi.web.version";
    
    /** service property osgi.web.contextpath. See OSGi r4 */
    public static final String OSGI_WEB_CONTEXTPATH = "osgi.web.contextpath";
    
    /** See OSGi r4 p.427 */
    public static final String OSGI_BUNDLECONTEXT = "osgi-bundlecontext";

    

    /** url scheme to deploy war file as bundled webapp */
    public static final String RFC66_WAR_URL_SCHEME = "war";

    /**
     * Name of the header that defines the context path for the embedded webapp.
     */
    public static final String RFC66_WEB_CONTEXTPATH = "Web-ContextPath";

    /**
     * Name of the header that defines the path to the folder where the jsp
     * files are extracted.
     */
    public static final String RFC66_JSP_EXTRACT_LOCATION = "Jsp-ExtractLocation";

    /** Name of the servlet context attribute that points to the bundle context. */
    public static final String RFC66_OSGI_BUNDLE_CONTEXT = "osgi-bundlecontext";

    /** Name of the servlet context attribute that points to the bundle object.
     * We can't always rely on the bundle-context as there might be no such thing. */
    public static final String JETTY_OSGI_BUNDLE = "osgi-bundle";

    /** List of relative pathes within the bundle to the jetty context files. */
    public static final String JETTY_CONTEXT_FILE_PATH = "Jetty-ContextFilePath";

    /** path within the bundle to the folder that contains the basic resources. */
    public static final String JETTY_WAR_FOLDER_PATH = "Jetty-WarFolderPath";

    /** path within a fragment hosted by a web-bundle to a folder that contains basic resources.
     * the path is appended to the lookup path where jetty locates static resources */
    public static final String JETTY_WAR_FRAGMENT_FOLDER_PATH = "Jetty-WarFragmentFolderPath";

    /** path within a fragment hosted by a web-bundle to a folder that contains basic resources.
     * The path is prefixed to the lookup path where jetty locates static resources:
     * this will override static resources with the same name in the web-bundle. */
    public static final String JETTY_WAR_PATCH_FRAGMENT_FOLDER_PATH = "Jetty-WarPatchFragmentFolderPath";

  
    /** 
     * web app context path 
     * @deprecated see RFC66_WEB_CONTEXTPATH
     */
    public static final String SERVICE_PROP_CONTEXT_PATH = "contextPath";

    
    /** 
     * Path to the web application base folder 
     * @deprecated see JETTY_WAR_FOLDER_PATH
     */
    public static final String SERVICE_PROP_WAR = "war";

    /** 
     * Extra classpath
     * @deprecated see JETTY_EXTRA_CLASSPATH 
     */
    public static final String SERVICE_PROP_EXTRA_CLASSPATH = "extraClasspath";
    
    public static final String JETTY_EXTRA_CLASSPATH = "Jetty-extraClasspath";

    /** 
     * jetty context file path 
     * @deprecated see JETTY_CONTEXT_FILE_PATH
     */
    public static final String SERVICE_PROP_CONTEXT_FILE_PATH = "contextFilePath";

    /** 
     * web.xml file path 
     * @deprecated see JETTY_WEB_XML_PATH
     */
    public static final String SERVICE_PROP_WEB_XML_PATH = "webXmlFilePath";
    
    public static final String JETTY_WEB_XML_PATH = "Jetty-WebXmlFilePath";

    /** 
     * defaultweb.xml file path 
     * @deprecated see JETTY_DEFAULT_WEB_XML_PATH
     */
    public static final String SERVICE_PROP_DEFAULT_WEB_XML_PATH = "defaultWebXmlFilePath";
    
    public static final String JETTY_DEFAULT_WEB_XML_PATH = "Jetty-defaultWebXmlFilePath";

    /**
     * path to the base folder that overrides the computed bundle installation
     * location if not null useful to install webapps or jetty context files
     * that are in fact not embedded in a bundle
     * @deprecated see JETTY_BUNDLE_INSTALL_LOCATION_OVERRIDE
     */
    public static final String SERVICE_PROP_BUNDLE_INSTALL_LOCATION_OVERRIDE = "thisBundleInstall";
    
    public static final String JETTY_BUNDLE_INSTALL_LOCATION_OVERRIDE = "Jetty-bundleInstall";
    
    /**
     * Comma separated list of bundles that contain tld file used by the webapp.
     */
    public static final String REQUIRE_TLD_BUNDLE = "Require-TldBundle";
    /**
     * Comma separated list of bundles that contain tld file used by the webapp.
     * Both the name of the manifest header and the name of the service property.
     */
    public static final String SERVICE_PROP_REQUIRE_TLD_BUNDLE = REQUIRE_TLD_BUNDLE;
    
    public static final String WATERMARK = "o.e.j.o.b.watermark";
    
    /**
     * Set of extra dirs that must not be served by osgi webapps
     */
    public static final String[] DEFAULT_PROTECTED_OSGI_TARGETS = {"/osgi-inf", "/osgi-opts"};

    
    
}

Back to the top