001: /*
002: * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/MappingRequest.java,v 1.1 2002/06/28 01:35:34 remm Exp $
003: * $Revision: 1.1 $
004: * $Date: 2002/06/28 01:35:34 $
005: *
006: * ====================================================================
007: *
008: * The Apache Software License, Version 1.1
009: *
010: * Copyright (c) 1999 The Apache Software Foundation. All rights
011: * reserved.
012: *
013: * Redistribution and use in source and binary forms, with or without
014: * modification, are permitted provided that the following conditions
015: * are met:
016: *
017: * 1. Redistributions of source code must retain the above copyright
018: * notice, this list of conditions and the following disclaimer.
019: *
020: * 2. Redistributions in binary form must reproduce the above copyright
021: * notice, this list of conditions and the following disclaimer in
022: * the documentation and/or other materials provided with the
023: * distribution.
024: *
025: * 3. The end-user documentation included with the redistribution, if
026: * any, must include the following acknowlegement:
027: * "This product includes software developed by the
028: * Apache Software Foundation (http://www.apache.org/)."
029: * Alternately, this acknowlegement may appear in the software itself,
030: * if and wherever such third-party acknowlegements normally appear.
031: *
032: * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
033: * Foundation" must not be used to endorse or promote products derived
034: * from this software without prior written permission. For written
035: * permission, please contact apache@apache.org.
036: *
037: * 5. Products derived from this software may not be called "Apache"
038: * nor may "Apache" appear in their names without prior written
039: * permission of the Apache Group.
040: *
041: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
042: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
043: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
044: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
045: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
046: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
047: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
048: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
049: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
050: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
051: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
052: * SUCH DAMAGE.
053: * ====================================================================
054: *
055: * This software consists of voluntary contributions made by many
056: * individuals on behalf of the Apache Software Foundation. For more
057: * information on the Apache Software Foundation, please see
058: * <http://www.apache.org/>.
059: *
060: * [Additional notices, if required by prior licensing conditions]
061: *
062: */
063:
064: package org.apache.catalina.core;
065:
066: import java.io.BufferedReader;
067: import java.io.InputStream;
068: import java.io.IOException;
069: import java.io.File;
070: import java.io.UnsupportedEncodingException;
071: import java.net.MalformedURLException;
072: import java.net.Socket;
073: import java.net.URL;
074: import java.security.AccessController;
075: import java.security.Principal;
076: import java.security.PrivilegedAction;
077: import java.security.PrivilegedExceptionAction;
078: import java.security.PrivilegedActionException;
079: import java.util.ArrayList;
080: import java.util.Arrays;
081: import java.util.Collections;
082: import java.util.Enumeration;
083: import java.util.HashMap;
084: import java.util.HashSet;
085: import java.util.Iterator;
086: import java.util.Locale;
087: import java.util.Map;
088: import java.util.Set;
089: import javax.naming.NamingException;
090: import javax.naming.Binding;
091: import javax.naming.directory.DirContext;
092: import javax.servlet.RequestDispatcher;
093: import javax.servlet.Servlet;
094: import javax.servlet.ServletContext;
095: import javax.servlet.ServletContextAttributeEvent;
096: import javax.servlet.ServletContextAttributeListener;
097: import javax.servlet.ServletInputStream;
098: import javax.servlet.ServletRequest;
099: import javax.servlet.http.Cookie;
100: import javax.servlet.http.HttpServletRequest;
101: import javax.servlet.http.HttpSession;
102: import org.apache.naming.resources.Resource;
103: import org.apache.naming.resources.DirContextURLStreamHandler;
104: import org.apache.naming.resources.DirContextURLConnection;
105: import org.apache.catalina.Connector;
106: import org.apache.catalina.Container;
107: import org.apache.catalina.Context;
108: import org.apache.catalina.Globals;
109: import org.apache.catalina.Host;
110: import org.apache.catalina.HttpRequest;
111: import org.apache.catalina.Logger;
112: import org.apache.catalina.Response;
113: import org.apache.catalina.Wrapper;
114: import org.apache.catalina.connector.HttpRequestBase;
115: import org.apache.catalina.deploy.ApplicationParameter;
116: import org.apache.catalina.util.Enumerator;
117: import org.apache.catalina.util.ResourceSet;
118: import org.apache.catalina.util.ServerInfo;
119: import org.apache.catalina.util.StringManager;
120:
121: /**
122: *
123: *
124: * @author Remy Maucherat
125: * @version $Revision: 1.1 $ $Date: 2002/06/28 01:35:34 $
126: */
127:
128: public class MappingRequest implements HttpRequest, HttpServletRequest {
129:
130: public MappingRequest(String contextPath, String decodedURI,
131: String queryString) {
132: this .contextPath = contextPath;
133: this .decodedURI = decodedURI;
134: this .queryString = queryString;
135: }
136:
137: protected String contextPath = null;
138: protected String decodedURI = null;
139: protected String queryString = null;
140:
141: protected String pathInfo = null;
142: protected String servletPath = null;
143: protected Wrapper wrapper = null;
144:
145: public String getContextPath() {
146: return (contextPath);
147: }
148:
149: public ServletRequest getRequest() {
150: return (this );
151: }
152:
153: public String getDecodedRequestURI() {
154: return decodedURI;
155: }
156:
157: public String getQueryString() {
158: return queryString;
159: }
160:
161: public void setQueryString(String query) {
162: queryString = query;
163: }
164:
165: public String getPathInfo() {
166: return pathInfo;
167: }
168:
169: public void setPathInfo(String path) {
170: pathInfo = path;
171: }
172:
173: public String getServletPath() {
174: return servletPath;
175: }
176:
177: public void setServletPath(String path) {
178: servletPath = path;
179: }
180:
181: public Wrapper getWrapper() {
182: return (this .wrapper);
183: }
184:
185: public void setWrapper(Wrapper wrapper) {
186: this .wrapper = wrapper;
187: }
188:
189: public String getAuthorization() {
190: return null;
191: }
192:
193: public void setAuthorization(String authorization) {
194: }
195:
196: public Connector getConnector() {
197: return null;
198: }
199:
200: public void setConnector(Connector connector) {
201: }
202:
203: public Context getContext() {
204: return null;
205: }
206:
207: public void setContext(Context context) {
208: }
209:
210: public String getInfo() {
211: return null;
212: }
213:
214: public Response getResponse() {
215: return null;
216: }
217:
218: public void setResponse(Response response) {
219: }
220:
221: public Socket getSocket() {
222: return null;
223: }
224:
225: public void setSocket(Socket socket) {
226: }
227:
228: public InputStream getStream() {
229: return null;
230: }
231:
232: public void setStream(InputStream input) {
233: }
234:
235: public void addLocale(Locale locale) {
236: }
237:
238: public ServletInputStream createInputStream() throws IOException {
239: return null;
240: }
241:
242: public void finishRequest() throws IOException {
243: }
244:
245: public Object getNote(String name) {
246: return null;
247: }
248:
249: public Iterator getNoteNames() {
250: return null;
251: }
252:
253: public void removeNote(String name) {
254: }
255:
256: public void setContentType(String type) {
257: }
258:
259: public void setNote(String name, Object value) {
260: }
261:
262: public void setProtocol(String protocol) {
263: }
264:
265: public void setRemoteAddr(String remoteAddr) {
266: }
267:
268: public void setRemoteHost(String remoteHost) {
269: }
270:
271: public void setScheme(String scheme) {
272: }
273:
274: public void setServerName(String name) {
275: }
276:
277: public void setServerPort(int port) {
278: }
279:
280: public Object getAttribute(String name) {
281: return null;
282: }
283:
284: public Enumeration getAttributeNames() {
285: return null;
286: }
287:
288: public String getCharacterEncoding() {
289: return null;
290: }
291:
292: public int getContentLength() {
293: return -1;
294: }
295:
296: public void setContentLength(int length) {
297: }
298:
299: public String getContentType() {
300: return null;
301: }
302:
303: public ServletInputStream getInputStream() throws IOException {
304: return null;
305: }
306:
307: public Locale getLocale() {
308: return null;
309: }
310:
311: public Enumeration getLocales() {
312: return null;
313: }
314:
315: public String getProtocol() {
316: return null;
317: }
318:
319: public BufferedReader getReader() throws IOException {
320: return null;
321: }
322:
323: public String getRealPath(String path) {
324: return null;
325: }
326:
327: public String getRemoteAddr() {
328: return null;
329: }
330:
331: public String getRemoteHost() {
332: return null;
333: }
334:
335: public String getScheme() {
336: return null;
337: }
338:
339: public String getServerName() {
340: return null;
341: }
342:
343: public int getServerPort() {
344: return -1;
345: }
346:
347: public boolean isSecure() {
348: return false;
349: }
350:
351: public void removeAttribute(String name) {
352: }
353:
354: public void setAttribute(String name, Object value) {
355: }
356:
357: public void setCharacterEncoding(String enc)
358: throws UnsupportedEncodingException {
359: }
360:
361: public void addCookie(Cookie cookie) {
362: }
363:
364: public void addHeader(String name, String value) {
365: }
366:
367: public void addParameter(String name, String values[]) {
368: }
369:
370: public void clearCookies() {
371: }
372:
373: public void clearHeaders() {
374: }
375:
376: public void clearLocales() {
377: }
378:
379: public void clearParameters() {
380: }
381:
382: public void recycle() {
383: }
384:
385: public void setAuthType(String authType) {
386: }
387:
388: public void setContextPath(String path) {
389: }
390:
391: public void setMethod(String method) {
392: }
393:
394: public void setRequestedSessionCookie(boolean flag) {
395: }
396:
397: public void setRequestedSessionId(String id) {
398: }
399:
400: public void setRequestedSessionURL(boolean flag) {
401: }
402:
403: public void setRequestURI(String uri) {
404: }
405:
406: public void setSecure(boolean secure) {
407: }
408:
409: public void setUserPrincipal(Principal principal) {
410: }
411:
412: public String getParameter(String name) {
413: return null;
414: }
415:
416: public Map getParameterMap() {
417: return null;
418: }
419:
420: public Enumeration getParameterNames() {
421: return null;
422: }
423:
424: public String[] getParameterValues(String name) {
425: return null;
426: }
427:
428: public RequestDispatcher getRequestDispatcher(String path) {
429: return null;
430: }
431:
432: public String getAuthType() {
433: return null;
434: }
435:
436: public Cookie[] getCookies() {
437: return null;
438: }
439:
440: public long getDateHeader(String name) {
441: return -1;
442: }
443:
444: public String getHeader(String name) {
445: return null;
446: }
447:
448: public Enumeration getHeaders(String name) {
449: return null;
450: }
451:
452: public Enumeration getHeaderNames() {
453: return null;
454: }
455:
456: public int getIntHeader(String name) {
457: return -1;
458: }
459:
460: public String getMethod() {
461: return null;
462: }
463:
464: public String getPathTranslated() {
465: return null;
466: }
467:
468: public String getRemoteUser() {
469: return null;
470: }
471:
472: public String getRequestedSessionId() {
473: return null;
474: }
475:
476: public String getRequestURI() {
477: return null;
478: }
479:
480: public void setDecodedRequestURI(String uri) {
481: }
482:
483: public StringBuffer getRequestURL() {
484: return null;
485: }
486:
487: public HttpSession getSession() {
488: return null;
489: }
490:
491: public HttpSession getSession(boolean create) {
492: return null;
493: }
494:
495: public boolean isRequestedSessionIdFromCookie() {
496: return false;
497: }
498:
499: public boolean isRequestedSessionIdFromURL() {
500: return false;
501: }
502:
503: public boolean isRequestedSessionIdFromUrl() {
504: return false;
505: }
506:
507: public boolean isRequestedSessionIdValid() {
508: return false;
509: }
510:
511: public boolean isUserInRole(String role) {
512: return false;
513: }
514:
515: public Principal getUserPrincipal() {
516: return null;
517: }
518:
519: }
|