1
|
|
/* Generated by AspectJ version 1.0.5 */
|
2
|
|
package org.apache.cactus.server;
|
3
|
|
import java.io.BufferedReader;
|
4
|
|
import java.io.File;
|
5
|
|
import java.io.IOException;
|
6
|
|
import java.security.Principal;
|
7
|
|
import java.util.Enumeration;
|
8
|
|
import java.util.Locale;
|
9
|
|
import javax.servlet.RequestDispatcher;
|
10
|
|
import javax.servlet.ServletInputStream;
|
11
|
|
import javax.servlet.http.HttpServletRequest;
|
12
|
|
import javax.servlet.http.HttpSession;
|
13
|
|
import javax.servlet.http.Cookie;
|
14
|
|
import org.apache.cactus.ServletURL;
|
15
|
|
import org.apache.commons.logging.LogFactory;
|
16
|
|
import org.apache.commons.logging.Log;
|
17
|
|
|
18
|
|
/**
|
19
|
|
* Abstract wrapper around <code>HttpServletRequest</code>. This class provides
|
20
|
|
* a common implementation of the wrapper for the different servlet API.
|
21
|
|
*
|
22
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
23
|
|
*
|
24
|
|
* @version $Id: AbstractHttpServletRequestWrapper.java,v 1.5 2002/07/22 12:26:04 vmassol Exp $
|
25
|
|
*/
|
26
|
|
public abstract class AbstractHttpServletRequestWrapper implements HttpServletRequest {
|
27
|
|
/**
|
28
|
|
* The real HTTP request
|
29
|
|
*/
|
30
|
|
protected HttpServletRequest request;
|
31
|
|
/**
|
32
|
|
* The URL to simulate
|
33
|
|
*/
|
34
|
|
protected ServletURL url;
|
35
|
|
/**
|
36
|
|
* Remote IP address to simulate (if any)
|
37
|
|
* @see #setRemoteIPAddress(String)
|
38
|
|
*/
|
39
|
|
protected String remoteIPAddress;
|
40
|
|
/**
|
41
|
|
* Remote Host name to simulate (if any)
|
42
|
|
* @see #setRemoteHostName(String)
|
43
|
|
*/
|
44
|
|
protected String remoteHostName;
|
45
|
|
/**
|
46
|
|
* The logger
|
47
|
|
*/
|
48
|
|
private static Log LOGGER;
|
49
|
|
/**
|
50
|
|
* Construct an <code>HttpServletRequest</code> instance that delegates
|
51
|
|
* it's method calls to the request object passed as parameter and that
|
52
|
|
* uses the URL passed as parameter to simulate a URL from which the request
|
53
|
|
* would come from.
|
54
|
|
*
|
55
|
|
* @param theRequest the real HTTP request
|
56
|
|
* @param theURL the URL to simulate or <code>null</code> if none
|
57
|
|
*/
|
58
|
0
|
public AbstractHttpServletRequestWrapper(HttpServletRequest theRequest, ServletURL theURL) {
|
59
|
0
|
super();
|
60
|
0
|
this.request = theRequest;
|
61
|
0
|
this.url = theURL;
|
62
|
|
}
|
63
|
|
/**
|
64
|
|
* @return the original request object
|
65
|
|
*/
|
66
|
0
|
public HttpServletRequest getOriginalRequest() {
|
67
|
0
|
return this.request;
|
68
|
|
}
|
69
|
|
|
70
|
|
/**
|
71
|
|
* Simulates the remote IP address (i.e. the client IP address).
|
72
|
|
*
|
73
|
|
* @param theRemoteIPAddress the simulated IP address in string format.
|
74
|
|
* Exemple : "127.0.0.1"
|
75
|
|
*/
|
76
|
0
|
public void setRemoteIPAddress(String theRemoteIPAddress) {
|
77
|
0
|
this.remoteIPAddress = theRemoteIPAddress;
|
78
|
|
}
|
79
|
|
|
80
|
|
/**
|
81
|
|
* Simulates the remote host name(i.e. the client host name).
|
82
|
|
*
|
83
|
|
* @param theRemoteHostName the simulated host name in string format.
|
84
|
|
* Exemple : "atlantis"
|
85
|
|
*/
|
86
|
0
|
public void setRemoteHostName(String theRemoteHostName) {
|
87
|
0
|
this.remoteHostName = theRemoteHostName;
|
88
|
|
}
|
89
|
|
|
90
|
|
/**
|
91
|
|
* @return the context path from the simulated URL or the real context path
|
92
|
|
* if a simulation URL has not been defined.
|
93
|
|
*/
|
94
|
0
|
public String getContextPath() {
|
95
|
0
|
String result;
|
96
|
0
|
if ((this.url != null) && (this.url.getContextPath() != null)) {
|
97
|
0
|
result = this.url.getContextPath();
|
98
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated context : [" + result + "]");
|
99
|
|
} else {
|
100
|
0
|
result = this.request.getContextPath();
|
101
|
|
}
|
102
|
0
|
return result;
|
103
|
|
}
|
104
|
|
|
105
|
|
/**
|
106
|
|
* @return the path info from the simulated URL or the real path info
|
107
|
|
* if a simulation URL has not been defined.
|
108
|
|
*/
|
109
|
0
|
public String getPathInfo() {
|
110
|
0
|
String result;
|
111
|
0
|
if (this.url != null) {
|
112
|
0
|
result = this.url.getPathInfo();
|
113
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated PathInfo : [" + result +
|
114
|
|
"]");
|
115
|
|
} else {
|
116
|
0
|
result = this.request.getPathInfo();
|
117
|
|
}
|
118
|
0
|
return result;
|
119
|
|
}
|
120
|
|
|
121
|
|
/**
|
122
|
|
* @return the server name from the simulated URL or the real server name
|
123
|
|
* if a simulation URL has not been defined.
|
124
|
|
*/
|
125
|
0
|
public String getServerName() {
|
126
|
0
|
String result;
|
127
|
0
|
if ((this.url != null) && (this.url.getServerName() != null)) {
|
128
|
0
|
result = this.url.getHost();
|
129
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated server name : [" + result +
|
130
|
|
"]");
|
131
|
|
} else {
|
132
|
0
|
result = this.request.getServerName();
|
133
|
|
}
|
134
|
0
|
return result;
|
135
|
|
}
|
136
|
|
|
137
|
|
/**
|
138
|
|
* @return the server port number from the simulated URL or the real server
|
139
|
|
* port number if a simulation URL has not been defined. If not
|
140
|
|
* port is defined, then port 80 is returned.
|
141
|
|
*/
|
142
|
0
|
public int getServerPort() {
|
143
|
0
|
int result;
|
144
|
0
|
if (this.url != null) {
|
145
|
0
|
result = (this.url.getPort() == -1) ? 80 : this.url.getPort();
|
146
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated server port : [" + result +
|
147
|
|
"]");
|
148
|
|
} else {
|
149
|
0
|
result = this.request.getServerPort();
|
150
|
|
}
|
151
|
0
|
return result;
|
152
|
|
}
|
153
|
|
|
154
|
|
/**
|
155
|
|
* @return the URI from the simulated URL or the real URI
|
156
|
|
* if a simulation URL has not been defined.
|
157
|
|
*/
|
158
|
0
|
public String getRequestURI() {
|
159
|
0
|
String result;
|
160
|
0
|
if (this.url != null) {
|
161
|
0
|
result = this.getContextPath() + ((this.getServletPath() == null) ? "" : this.getServletPath(
|
162
|
|
)) + ((this.getPathInfo() == null) ? "" : this.getPathInfo());
|
163
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated request URI : [" + result +
|
164
|
|
"]");
|
165
|
|
} else {
|
166
|
0
|
result = this.request.getRequestURI();
|
167
|
|
}
|
168
|
0
|
return result;
|
169
|
|
}
|
170
|
|
|
171
|
|
/**
|
172
|
|
* @return the servlet path from the simulated URL or the real servlet path
|
173
|
|
* if a simulation URL has not been defined.
|
174
|
|
*/
|
175
|
0
|
public String getServletPath() {
|
176
|
0
|
String result;
|
177
|
0
|
if (this.url != null) {
|
178
|
0
|
result = this.url.getServletPath();
|
179
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated servlet path : [" + result +
|
180
|
|
"]");
|
181
|
|
} else {
|
182
|
0
|
result = this.request.getServletPath();
|
183
|
|
}
|
184
|
0
|
return result;
|
185
|
|
}
|
186
|
|
|
187
|
|
/**
|
188
|
|
* @return any extra path information after the servlet name but
|
189
|
|
* before the query string, and translates it to a real path.
|
190
|
|
* Takes into account the simulated URL (if any).
|
191
|
|
*/
|
192
|
0
|
public String getPathTranslated() {
|
193
|
0
|
String pathTranslated;
|
194
|
0
|
String pathInfo = this.url.getPathInfo();
|
195
|
0
|
if (pathInfo != null) {
|
196
|
0
|
if (this.request.getRealPath("/") == null) {
|
197
|
0
|
pathTranslated = null;
|
198
|
|
} else {
|
199
|
0
|
String newPathInfo = (pathInfo.startsWith("/") ? pathInfo.substring(1) : pathInfo);
|
200
|
0
|
if (this.request.getRealPath("/").endsWith("/")) {
|
201
|
0
|
pathTranslated = this.request.getRealPath("/") + newPathInfo.replace('/',
|
202
|
|
File.separatorChar);
|
203
|
|
} else {
|
204
|
0
|
pathTranslated = this.request.getRealPath("/") + File.separatorChar +
|
205
|
|
newPathInfo.replace('/', File.separatorChar);
|
206
|
|
}
|
207
|
|
}
|
208
|
|
} else {
|
209
|
0
|
pathTranslated = this.request.getPathTranslated();
|
210
|
|
}
|
211
|
0
|
return pathTranslated;
|
212
|
|
}
|
213
|
|
|
214
|
|
/**
|
215
|
|
* @return the query string from the simulated URL or the real query
|
216
|
|
* string if a simulation URL has not been defined.
|
217
|
|
*/
|
218
|
0
|
public String getQueryString() {
|
219
|
0
|
String result;
|
220
|
0
|
if (this.url != null) {
|
221
|
0
|
result = this.url.getQueryString();
|
222
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Using simulated query string : [" + result +
|
223
|
|
"]");
|
224
|
|
} else {
|
225
|
0
|
result = this.request.getQueryString();
|
226
|
|
}
|
227
|
0
|
return result;
|
228
|
|
}
|
229
|
|
|
230
|
|
/**
|
231
|
|
* @param thePath the path to the resource
|
232
|
|
* @return a wrapped request dispatcher instead of the real one, so that
|
233
|
|
* forward() and include() calls will use the wrapped dispatcher
|
234
|
|
* passing it the *original* request [this is needed for some
|
235
|
|
* servlet engine like Tomcat 3.x which do not support the new
|
236
|
|
* mechanism introduced by Servlet 2.3 Filters].
|
237
|
|
* @see HttpServletRequest#getRequestDispatcher(String)
|
238
|
|
*/
|
239
|
0
|
public RequestDispatcher getRequestDispatcher(String thePath) {
|
240
|
0
|
if (thePath == null) {
|
241
|
0
|
return ((RequestDispatcher)(null));
|
242
|
|
}
|
243
|
0
|
RequestDispatcher dispatcher = null;
|
244
|
0
|
String fullPath;
|
245
|
0
|
if (thePath.startsWith("/")) {
|
246
|
0
|
fullPath = thePath;
|
247
|
|
} else {
|
248
|
0
|
String pI = this.getPathInfo();
|
249
|
0
|
if (pI == null) {
|
250
|
0
|
fullPath = this.catPath(this.getServletPath(), thePath);
|
251
|
|
} else {
|
252
|
0
|
fullPath = this.catPath(this.getServletPath() + pI, thePath);
|
253
|
|
}
|
254
|
0
|
if (fullPath == null) {
|
255
|
0
|
return ((RequestDispatcher)(null));
|
256
|
|
}
|
257
|
|
}
|
258
|
0
|
AbstractHttpServletRequestWrapper.LOGGER.debug("Computed full path : [" + fullPath + "]");
|
259
|
0
|
dispatcher = new RequestDispatcherWrapper(this.request.getRequestDispatcher(fullPath));
|
260
|
0
|
return dispatcher;
|
261
|
|
}
|
262
|
|
|
263
|
|
/**
|
264
|
|
* Will concatenate 2 paths, normalising it. For example :
|
265
|
|
* ( /a/b/c + d = /a/b/d, /a/b/c + ../d = /a/d ). Code borrowed from
|
266
|
|
* Tomcat 3.2.2 !
|
267
|
|
*
|
268
|
|
* @param theLookupPath the first part of the path
|
269
|
|
* @param thePath the part to add to the lookup path
|
270
|
|
* @return the concatenated thePath or null if an error occurs
|
271
|
|
*/
|
272
|
0
|
private String catPath(String theLookupPath, String thePath) {
|
273
|
0
|
int index = theLookupPath.lastIndexOf("/");
|
274
|
0
|
theLookupPath = theLookupPath.substring(0, index);
|
275
|
0
|
while (thePath.startsWith("../")){
|
276
|
0
|
if (theLookupPath.length() > 0) {
|
277
|
0
|
index = theLookupPath.lastIndexOf("/");
|
278
|
0
|
theLookupPath = theLookupPath.substring(0, index);
|
279
|
|
} else {
|
280
|
0
|
return ((String)(null));
|
281
|
|
}
|
282
|
0
|
index = thePath.indexOf("../") + 3;
|
283
|
0
|
thePath = thePath.substring(index);
|
284
|
|
}
|
285
|
0
|
return theLookupPath + "/" + thePath;
|
286
|
|
}
|
287
|
|
|
288
|
|
/**
|
289
|
|
* @return the simulated remote IP address if any or the real one.
|
290
|
|
*
|
291
|
|
* @see HttpServletRequest#getRemoteAddr()
|
292
|
|
*/
|
293
|
0
|
public String getRemoteAddr() {
|
294
|
0
|
String remoteIPAddress;
|
295
|
0
|
if (this.remoteIPAddress != null) {
|
296
|
0
|
remoteIPAddress = this.remoteIPAddress;
|
297
|
|
} else {
|
298
|
0
|
remoteIPAddress = this.request.getRemoteAddr();
|
299
|
|
}
|
300
|
0
|
return remoteIPAddress;
|
301
|
|
}
|
302
|
|
|
303
|
|
/**
|
304
|
|
* @return the simulated remote host name if any or the real one.
|
305
|
|
*
|
306
|
|
* @see HttpServletRequest#getRemoteHost()
|
307
|
|
*/
|
308
|
0
|
public String getRemoteHost() {
|
309
|
0
|
String remoteHostName;
|
310
|
0
|
if (this.remoteHostName != null) {
|
311
|
0
|
remoteHostName = this.remoteHostName;
|
312
|
|
} else {
|
313
|
0
|
remoteHostName = this.request.getRemoteHost();
|
314
|
|
}
|
315
|
0
|
return remoteHostName;
|
316
|
|
}
|
317
|
|
|
318
|
|
/**
|
319
|
|
* @see HttpServletRequest#isRequestedSessionIdFromURL()
|
320
|
|
*/
|
321
|
0
|
public boolean isRequestedSessionIdFromURL() {
|
322
|
0
|
return this.request.isRequestedSessionIdFromURL();
|
323
|
|
}
|
324
|
|
|
325
|
|
/**
|
326
|
|
* @see HttpServletRequest#isRequestedSessionIdFromUrl()
|
327
|
|
*/
|
328
|
0
|
public boolean isRequestedSessionIdFromUrl() {
|
329
|
0
|
return this.request.isRequestedSessionIdFromURL();
|
330
|
|
}
|
331
|
|
|
332
|
|
/**
|
333
|
|
* @see HttpServletRequest#isUserInRole(String)
|
334
|
|
*/
|
335
|
0
|
public boolean isUserInRole(String theRole) {
|
336
|
0
|
return this.request.isUserInRole(theRole);
|
337
|
|
}
|
338
|
|
|
339
|
|
/**
|
340
|
|
* @see HttpServletRequest#isRequestedSessionIdValid()
|
341
|
|
*/
|
342
|
0
|
public boolean isRequestedSessionIdValid() {
|
343
|
0
|
return this.request.isRequestedSessionIdValid();
|
344
|
|
}
|
345
|
|
|
346
|
|
/**
|
347
|
|
* @see HttpServletRequest#isRequestedSessionIdFromCookie()
|
348
|
|
*/
|
349
|
0
|
public boolean isRequestedSessionIdFromCookie() {
|
350
|
0
|
return this.request.isRequestedSessionIdFromCookie();
|
351
|
|
}
|
352
|
|
|
353
|
|
/**
|
354
|
|
* @see HttpServletRequest#getLocales()
|
355
|
|
*/
|
356
|
0
|
public Enumeration getLocales() {
|
357
|
0
|
return this.request.getLocales();
|
358
|
|
}
|
359
|
|
|
360
|
|
/**
|
361
|
|
* @see HttpServletRequest#getHeader(String)
|
362
|
|
*/
|
363
|
0
|
public String getHeader(String theName) {
|
364
|
0
|
return this.request.getHeader(theName);
|
365
|
|
}
|
366
|
|
|
367
|
|
/**
|
368
|
|
* @see HttpServletRequest#getHeaders(String)
|
369
|
|
*/
|
370
|
0
|
public Enumeration getHeaders(String theName) {
|
371
|
0
|
return this.request.getHeaders(theName);
|
372
|
|
}
|
373
|
|
|
374
|
|
/**
|
375
|
|
* @see HttpServletRequest#getHeaderNames()
|
376
|
|
*/
|
377
|
0
|
public Enumeration getHeaderNames() {
|
378
|
0
|
return this.request.getHeaderNames();
|
379
|
|
}
|
380
|
|
|
381
|
|
/**
|
382
|
|
* @see HttpServletRequest#getScheme()
|
383
|
|
*/
|
384
|
0
|
public String getScheme() {
|
385
|
0
|
return this.request.getScheme();
|
386
|
|
}
|
387
|
|
|
388
|
|
/**
|
389
|
|
* @see HttpServletRequest#getAuthType()
|
390
|
|
*/
|
391
|
0
|
public String getAuthType() {
|
392
|
0
|
return this.request.getAuthType();
|
393
|
|
}
|
394
|
|
|
395
|
|
/**
|
396
|
|
* @see HttpServletRequest#getRealPath(String)
|
397
|
|
*/
|
398
|
0
|
public String getRealPath(String thePath) {
|
399
|
0
|
return this.request.getRealPath(thePath);
|
400
|
|
}
|
401
|
|
|
402
|
|
/**
|
403
|
|
* @see HttpServletRequest#getSession()
|
404
|
|
*/
|
405
|
0
|
public HttpSession getSession() {
|
406
|
0
|
return this.request.getSession();
|
407
|
|
}
|
408
|
|
|
409
|
|
/**
|
410
|
|
* @see HttpServletRequest#getSession(boolean)
|
411
|
|
*/
|
412
|
0
|
public HttpSession getSession(boolean isCreate) {
|
413
|
0
|
return this.request.getSession(isCreate);
|
414
|
|
}
|
415
|
|
|
416
|
|
/**
|
417
|
|
* @see HttpServletRequest#getReader()
|
418
|
|
*/
|
419
|
0
|
public BufferedReader getReader() throws IOException {
|
420
|
0
|
return this.request.getReader();
|
421
|
|
}
|
422
|
|
|
423
|
|
/**
|
424
|
|
* @see HttpServletRequest#getContentLength()
|
425
|
|
*/
|
426
|
0
|
public int getContentLength() {
|
427
|
0
|
return this.request.getContentLength();
|
428
|
|
}
|
429
|
|
|
430
|
|
/**
|
431
|
|
* @see HttpServletRequest#getParameterValues(String)
|
432
|
|
*/
|
433
|
0
|
public String[] getParameterValues(String theName) {
|
434
|
0
|
return this.request.getParameterValues(theName);
|
435
|
|
}
|
436
|
|
|
437
|
|
/**
|
438
|
|
* @see HttpServletRequest#getContentType()
|
439
|
|
*/
|
440
|
0
|
public String getContentType() {
|
441
|
0
|
return this.request.getContentType();
|
442
|
|
}
|
443
|
|
|
444
|
|
/**
|
445
|
|
* @see HttpServletRequest#getLocale()
|
446
|
|
*/
|
447
|
0
|
public Locale getLocale() {
|
448
|
0
|
return this.request.getLocale();
|
449
|
|
}
|
450
|
|
|
451
|
|
/**
|
452
|
|
* @see HttpServletRequest#removeAttribute(String)
|
453
|
|
*/
|
454
|
0
|
public void removeAttribute(String theName) {
|
455
|
0
|
this.request.removeAttribute(theName);
|
456
|
|
}
|
457
|
|
|
458
|
|
/**
|
459
|
|
* @see HttpServletRequest#getParameter(String)
|
460
|
|
*/
|
461
|
0
|
public String getParameter(String theName) {
|
462
|
0
|
return this.request.getParameter(theName);
|
463
|
|
}
|
464
|
|
|
465
|
|
/**
|
466
|
|
* @see HttpServletRequest#getInputStream()
|
467
|
|
*/
|
468
|
0
|
public ServletInputStream getInputStream() throws IOException {
|
469
|
0
|
return this.request.getInputStream();
|
470
|
|
}
|
471
|
|
|
472
|
|
/**
|
473
|
|
* @see HttpServletRequest#getUserPrincipal()
|
474
|
|
*/
|
475
|
0
|
public Principal getUserPrincipal() {
|
476
|
0
|
return this.request.getUserPrincipal();
|
477
|
|
}
|
478
|
|
|
479
|
|
/**
|
480
|
|
* @see HttpServletRequest#isSecure()
|
481
|
|
*/
|
482
|
0
|
public boolean isSecure() {
|
483
|
0
|
return this.request.isSecure();
|
484
|
|
}
|
485
|
|
|
486
|
|
/**
|
487
|
|
* @see HttpServletRequest#getCharacterEncoding()
|
488
|
|
*/
|
489
|
0
|
public String getCharacterEncoding() {
|
490
|
0
|
return this.request.getCharacterEncoding();
|
491
|
|
}
|
492
|
|
|
493
|
|
/**
|
494
|
|
* @see HttpServletRequest#getParameterNames()
|
495
|
|
*/
|
496
|
0
|
public Enumeration getParameterNames() {
|
497
|
0
|
return this.request.getParameterNames();
|
498
|
|
}
|
499
|
|
|
500
|
|
/**
|
501
|
|
* @see HttpServletRequest#getMethod()
|
502
|
|
*/
|
503
|
0
|
public String getMethod() {
|
504
|
0
|
return this.request.getMethod();
|
505
|
|
}
|
506
|
|
|
507
|
|
/**
|
508
|
|
* @see HttpServletRequest#setAttribute(String, Object)
|
509
|
|
*/
|
510
|
0
|
public void setAttribute(String theName, Object theAttribute) {
|
511
|
0
|
this.request.setAttribute(theName, theAttribute);
|
512
|
|
}
|
513
|
|
|
514
|
|
/**
|
515
|
|
* @see HttpServletRequest#getAttribute(String)
|
516
|
|
*/
|
517
|
0
|
public Object getAttribute(String theName) {
|
518
|
0
|
return this.request.getAttribute(theName);
|
519
|
|
}
|
520
|
|
|
521
|
|
/**
|
522
|
|
* @see HttpServletRequest#getIntHeader(String)
|
523
|
|
*/
|
524
|
0
|
public int getIntHeader(String theName) {
|
525
|
0
|
return this.request.getIntHeader(theName);
|
526
|
|
}
|
527
|
|
|
528
|
|
/**
|
529
|
|
* @see HttpServletRequest#getDateHeader(String)
|
530
|
|
*/
|
531
|
0
|
public long getDateHeader(String theName) {
|
532
|
0
|
return this.request.getDateHeader(theName);
|
533
|
|
}
|
534
|
|
|
535
|
|
/**
|
536
|
|
* @see HttpServletRequest#getAttributeNames()
|
537
|
|
*/
|
538
|
0
|
public Enumeration getAttributeNames() {
|
539
|
0
|
return this.request.getAttributeNames();
|
540
|
|
}
|
541
|
|
|
542
|
|
/**
|
543
|
|
* @see HttpServletRequest#getRemoteUser()
|
544
|
|
*/
|
545
|
0
|
public String getRemoteUser() {
|
546
|
0
|
return this.request.getRemoteUser();
|
547
|
|
}
|
548
|
|
|
549
|
|
/**
|
550
|
|
* @see HttpServletRequest#getRequestedSessionId()
|
551
|
|
*/
|
552
|
0
|
public String getRequestedSessionId() {
|
553
|
0
|
return this.request.getRequestedSessionId();
|
554
|
|
}
|
555
|
|
|
556
|
|
/**
|
557
|
|
* @see HttpServletRequest#getCookies()
|
558
|
|
*/
|
559
|
0
|
public Cookie[] getCookies() {
|
560
|
0
|
return this.request.getCookies();
|
561
|
|
}
|
562
|
|
|
563
|
|
/**
|
564
|
|
* @see HttpServletRequest#getProtocol()
|
565
|
|
*/
|
566
|
0
|
public String getProtocol() {
|
567
|
0
|
return this.request.getProtocol();
|
568
|
|
}
|
569
|
|
|
570
|
|
public abstract StringBuffer getRequestURL();
|
571
|
|
|
572
|
|
public abstract void setCharacterEncoding(String __0) throws
|
573
|
|
java.io.UnsupportedEncodingException;
|
574
|
|
|
575
|
|
public abstract java.util.Map getParameterMap();
|
576
|
|
|
577
|
|
/**
|
578
|
|
* Abstract wrapper around <code>HttpServletRequest</code>. This class provides
|
579
|
|
* a common implementation of the wrapper for the different servlet API.
|
580
|
|
*
|
581
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
582
|
|
*
|
583
|
|
* @version $Id: AbstractHttpServletRequestWrapper.java,v 1.5 2002/07/22 12:26:04 vmassol Exp $
|
584
|
|
*/
|
585
|
|
static {
|
586
|
|
/**
|
587
|
|
* The logger
|
588
|
|
*/
|
589
|
0
|
AbstractHttpServletRequestWrapper.LOGGER = LogFactory.getLog(
|
590
|
|
AbstractHttpServletRequestWrapper.class);
|
591
|
|
}
|
592
|
|
|
593
|
|
}
|