KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cactus > server > HttpServletRequestWrapper


1 /*
2  * ========================================================================
3  *
4  * Copyright 2001-2003 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * ========================================================================
19  */

20 package org.apache.cactus.server;
21
22 import javax.servlet.http.HttpServletRequest JavaDoc;
23
24 import org.apache.cactus.ServletURL;
25
26 /**
27  * Encapsulation class for the Servlet 2.2 API <code>HttpServletRequest</code>.
28  * This is an implementation that delegates all the call to the
29  * <code>HttpServletRequest</code> object passed in the constructor except for
30  * some overridden methods which are use to simulate a URL. This is to be able
31  * to simulate any URL that would have been used to call the test method : if
32  * this was not done, the URL that would be returned (by calling the
33  * <code>getRequestURI()</code> method or others alike) would be the URL of the
34  * server redirector servlet or JSP and not a URL that the test case want to
35  * simulate.
36  *
37  * @version $Id: HttpServletRequestWrapper.java,v 1.1 2004/05/22 11:34:48 vmassol Exp $
38  */

39 public class HttpServletRequestWrapper
40     extends AbstractHttpServletRequestWrapper
41 {
42     /**
43      * Construct an <code>HttpServletRequest</code> instance that delegates
44      * it's method calls to the request object passed as parameter and that
45      * uses the URL passed as parameter to simulate a URL from which the request
46      * would come from.
47      *
48      * @param theRequest the real HTTP request
49      * @param theURL the URL to simulate or <code>null</code> if none
50      */

51     public HttpServletRequestWrapper(HttpServletRequest JavaDoc theRequest,
52         ServletURL theURL)
53     {
54         super(theRequest, theURL);
55     }
56 }
57
Popular Tags