1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.eclipse.jetty.osgi.boot.jsp;
20
21 import org.eclipse.jetty.osgi.boot.BundleWebAppProvider;
22 import org.eclipse.jetty.osgi.boot.internal.webapp.WebBundleTrackerCustomizer;
23 import org.eclipse.jetty.osgi.boot.jasper.PluggableWebAppRegistrationCustomizerImpl;
24 import org.eclipse.jetty.osgi.boot.jasper.WebappRegistrationCustomizerImpl;
25 import org.osgi.framework.BundleActivator;
26 import org.osgi.framework.BundleContext;
27
28
29
30
31
32
33
34
35
36
37
38
39 public class FragmentActivator implements BundleActivator
40 {
41
42
43
44 public void start(BundleContext context) throws Exception
45 {
46 System.setProperty("org.apache.jasper.compiler.disablejsr199", Boolean.TRUE.toString());
47 WebBundleTrackerCustomizer.JSP_REGISTRATION_HELPERS.add(new WebappRegistrationCustomizerImpl());
48 WebBundleTrackerCustomizer.JSP_REGISTRATION_HELPERS.add(new PluggableWebAppRegistrationCustomizerImpl());
49
50 addTagLibSupport();
51
52 }
53
54
55
56
57 public void stop(BundleContext context) throws Exception
58 {
59
60 }
61
62 public void addTagLibSupport ()
63 {
64 String[] defaultConfigurations = new String[BundleWebAppProvider.getDefaultConfigurations().length+1];
65 System.arraycopy(BundleWebAppProvider.getDefaultConfigurations(), 0, defaultConfigurations, 0, BundleWebAppProvider.getDefaultConfigurations().length);
66 defaultConfigurations[defaultConfigurations.length-1] = "org.eclipse.jetty.osgi.boot.jsp.TagLibOSGiConfiguration";
67 BundleWebAppProvider.setDefaultConfigurations(defaultConfigurations);
68 }
69 }