2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

View Javadoc

1   /* 
2    * ========================================================================
3    * 
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   * 
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   * 
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * 
19   * ========================================================================
20   */
21  package org.apache.cactus.internal.server;
22  
23  import javax.servlet.ServletContext;
24  import javax.servlet.http.HttpServletRequest;
25  import javax.servlet.http.HttpServletResponse;
26  
27  
28  /**
29   * Holder class that contains the instances of the implicit objects that exist
30   * for all web requests. Namely they are <code>HttpServletRequest</code>,
31   * <code>HttpServletResponse</code> and <code>ServletContext</code>.
32   *
33   * @version $Id: AbstractWebImplicitObjects.java 238991 2004-05-22 11:34:50Z vmassol $
34   */
35  public abstract class AbstractWebImplicitObjects implements WebImplicitObjects
36  {
37      /**
38       * The HTTP request object.
39       */
40      protected HttpServletRequest request;
41  
42      /**
43       * The HTTP response object.
44       */
45      protected HttpServletResponse response;
46  
47      /**
48       * The Context object.
49       */
50      protected ServletContext context;
51  
52      /**
53       * @return the <code>ServletContext</code> implicit object
54       */
55      public ServletContext getServletContext()
56      {
57          return this.context;
58      }
59  
60      /**
61       * @param theContext the <code>ServletContext</code> implicit object
62       */
63      public void setServletContext(ServletContext theContext)
64      {
65          this.context = theContext;
66      }
67  
68      /**
69       * @return the <code>HttpServletResponse</code> implicit object
70       */
71      public HttpServletResponse getHttpServletResponse()
72      {
73          return this.response;
74      }
75  
76      /**
77       * @param theResponse the <code>HttpServletResponse</code> implicit object
78       */
79      public void setHttpServletResponse(HttpServletResponse theResponse)
80      {
81          this.response = theResponse;
82      }
83  
84      /**
85       * @return the <code>HttpServletRequest</code> implicit object
86       */
87      public HttpServletRequest getHttpServletRequest()
88      {
89          return this.request;
90      }
91  
92      /**
93       * @param theRequest the <code>HttpServletRequest</code> implicit object
94       */
95      public void setHttpServletRequest(HttpServletRequest theRequest)
96      {
97          this.request = theRequest;
98      }
99  }