aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Nanz2012-02-09 14:58:10 (EST)
committerThomas Watson2012-02-09 14:58:10 (EST)
commit246fe89571124060a02b2249cd52342b34472501 (patch)
tree96fc34b1420f6aa9c767e080446400751f0c264c
parent5a0096c1c2ca124f8ceb4f8702a5bdeea8d79f11 (diff)
downloadrt.equinox.bundles-246fe89571124060a02b2249cd52342b34472501.zip
rt.equinox.bundles-246fe89571124060a02b2249cd52342b34472501.tar.gz
rt.equinox.bundles-246fe89571124060a02b2249cd52342b34472501.tar.bz2
Bug 371028 - ServletBridge vs Servlet 3.0: FrameworkLauncher does not
export javax.servlet.annotation, javax.servlet.descriptor
-rw-r--r--bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
index 36a7011..b80f9af 100644
--- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
+++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
@@ -252,10 +252,20 @@ public class FrameworkLauncher {
attribs.putValue(FRAGMENT_HOST, "system.bundle; extension:=framework"); //$NON-NLS-1$
String servletVersion = context.getMajorVersion() + "." + context.getMinorVersion(); //$NON-NLS-1$
- String packageExports = "org.eclipse.equinox.servletbridge; version=1.1" + //$NON-NLS-1$
- ", javax.servlet; version=" + servletVersion + //$NON-NLS-1$
- ", javax.servlet.http; version=" + servletVersion + //$NON-NLS-1$
- ", javax.servlet.resources; version=" + servletVersion; //$NON-NLS-1$
+ String packageExports = null;
+ if (context.getMajorVersion() >= 3) {
+ packageExports = "org.eclipse.equinox.servletbridge; version=1.1" + //$NON-NLS-1$
+ ", javax.servlet; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.annotation; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.descriptor; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.http; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.resources; version=" + servletVersion; //$NON-NLS-1$
+ } else {
+ packageExports = "org.eclipse.equinox.servletbridge; version=1.1" + //$NON-NLS-1$
+ ", javax.servlet; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.http; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.resources; version=" + servletVersion; //$NON-NLS-1$
+ }
String extendedExports = config.getInitParameter(CONFIG_EXTENDED_FRAMEWORK_EXPORTS);
if (extendedExports != null && extendedExports.trim().length() != 0)