File: eclipse-equinox-jsp-jasper.patch

package info (click to toggle)
eclipse 3.8.1-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 338,840 kB
  • ctags: 472,808
  • sloc: java: 2,762,042; ansic: 136,783; xml: 105,676; cpp: 35,759; jsp: 4,420; sh: 3,288; perl: 1,687; makefile: 232; python: 67; php: 24
file content (250 lines) | stat: -rw-r--r-- 7,457 bytes parent folder | download
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
--- plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/JspServlet.java	2012-01-16 11:56:16.162034430 +0100
+++ plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/JspServlet.java	2012-01-18 09:10:59.060929292 +0100
@@ -20,23 +20,33 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.security.AccessController;
 import java.security.Permission;
 import java.security.PermissionCollection;
+import java.security.PrivilegedAction;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.EventListener;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
+import javax.servlet.Filter;
+import javax.servlet.FilterRegistration;
+import javax.servlet.FilterRegistration.Dynamic;
 import javax.servlet.Servlet;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.descriptor.JspConfigDescriptor;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.tomcat.InstanceManager;
 import org.eclipse.equinox.internal.jsp.jasper.JspClassLoader;
 import org.osgi.framework.Bundle;
 
@@ -109,6 +117,9 @@
 	}
 
 	public void init(ServletConfig config) throws ServletException {
+		// Set the InstanceManager conforming to Apache Tomcat 7
+		config.getServletContext().setAttribute(InstanceManager.class.getName(), new MyInstanceManager());
+
 		ClassLoader original = Thread.currentThread().getContextClassLoader();
 		try {
 			Thread.currentThread().setContextClassLoader(jspLoader);
@@ -318,5 +331,145 @@
 			}
 			return result;
 		}
+
+		public Dynamic addFilter(String arg0, String arg1) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public Dynamic addFilter(String arg0, Filter arg1) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public Dynamic addFilter(String arg0, Class arg1) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public void addListener(Class arg0) {
+			// TODO Auto-generated method stub
+
+		}
+
+		public void addListener(String arg0) {
+			// TODO Auto-generated method stub
+
+		}
+
+		public void addListener(EventListener arg0) {
+			// TODO Auto-generated method stub
+
+		}
+
+		public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, String arg1) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, Servlet arg1) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, Class arg1) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public Filter createFilter(Class arg0) throws ServletException {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public EventListener createListener(Class arg0) throws ServletException {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public Servlet createServlet(Class arg0) throws ServletException {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public void declareRoles(String[] arg0) {
+			// TODO Auto-generated method stub
+
+		}
+
+		public ClassLoader getClassLoader() {
+			class GetClassLoaderAction implements PrivilegedAction<Void> {
+				public ClassLoader classloader;
+
+				public Void run() {
+					classloader = delegate.getClassLoader();
+					return null;
+				}
+			}
+
+			GetClassLoaderAction action = new GetClassLoaderAction();
+			AccessController.doPrivileged(action);
+			return action.classloader;
+		}
+
+		public Set getDefaultSessionTrackingModes() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public int getEffectiveMajorVersion() {
+			// TODO Auto-generated method stub
+			return 0;
+		}
+
+		public int getEffectiveMinorVersion() {
+			// TODO Auto-generated method stub
+			return 0;
+		}
+
+		public Set getEffectiveSessionTrackingModes() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public FilterRegistration getFilterRegistration(String arg0) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public Map getFilterRegistrations() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public JspConfigDescriptor getJspConfigDescriptor() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public ServletRegistration getServletRegistration(String arg0) {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public Map getServletRegistrations() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public SessionCookieConfig getSessionCookieConfig() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public boolean setInitParameter(String arg0, String arg1) {
+			// TODO Auto-generated method stub
+			return false;
+		}
+
+		public void setSessionTrackingModes(Set arg0) throws IllegalStateException, IllegalArgumentException {
+			// TODO Auto-generated method stub
+
+		}
 	}
 }
--- plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/MyInstanceManager.java.old	1969-12-31 19:00:00.000000000 -0500
+++ plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/MyInstanceManager.java	2011-08-16 14:51:34.499027605 -0400
@@ -0,0 +1,35 @@
+package org.eclipse.equinox.jsp.jasper;
+
+import org.apache.tomcat.InstanceManager;
+
+public class MyInstanceManager implements InstanceManager {
+
+	public Object newInstance(String className) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Object newInstance(String fqcn, ClassLoader classLoader) throws ClassNotFoundException {
+
+		try {
+			return classLoader.loadClass(fqcn).newInstance();
+		} catch (InstantiationException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	public void newInstance(Object o) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void destroyInstance(Object o) {
+		// TODO Auto-generated method stub
+
+	}
+}
--- plugins/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF.old	2011-08-16 16:02:24.734122177 -0400
+++ plugins/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF	2011-08-16 16:06:15.933599606 -0400
@@ -6,12 +6,13 @@
 Bundle-SymbolicName: org.eclipse.equinox.jsp.jasper
 Bundle-Version: 1.0.300.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.jsp.jasper.Activator
-Import-Package: javax.servlet;version="[2.4, 3.1)",
+Import-Package: javax.servlet;version="[2.4.0,4.0)",
  javax.servlet.annotation;version="2.6";resolution:=optional,
  javax.servlet.descriptor;version="2.6";resolution:=optional,
- javax.servlet.http;version="[2.4, 3.1)",
- javax.servlet.jsp;version="[2.0, 2.3)",
- org.apache.jasper.servlet;version="[0, 6)",
+ javax.servlet.http;version="[2.4.0,4.0.0]",
+ javax.servlet.jsp;version="[2.0.0,2.3]",
+ org.apache.jasper.servlet;version="7.0.26",
+ org.apache.tomcat;version="7.0.26",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.http;version="1.2.0",
  org.osgi.service.packageadmin;version="1.2.0",