001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.catalina.core;
019:
020: import java.io.IOException;
021: import java.io.OutputStream;
022: import java.io.PrintWriter;
023: import java.util.Locale;
024:
025: import javax.servlet.ServletOutputStream;
026: import javax.servlet.ServletResponse;
027: import javax.servlet.http.Cookie;
028: import javax.servlet.http.HttpServletResponse;
029:
030: import org.apache.catalina.Context;
031: import org.apache.catalina.connector.Connector;
032: import org.apache.catalina.connector.Request;
033:
034: /**
035: * Dummy response object, used for JSP precompilation.
036: *
037: * @author Remy Maucherat
038: * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
039: */
040:
041: public class DummyResponse implements HttpServletResponse {
042:
043: public DummyResponse() {
044: }
045:
046: public void setAppCommitted(boolean appCommitted) {
047: }
048:
049: public boolean isAppCommitted() {
050: return false;
051: }
052:
053: public Connector getConnector() {
054: return null;
055: }
056:
057: public void setConnector(Connector connector) {
058: }
059:
060: public int getContentCount() {
061: return -1;
062: }
063:
064: public Context getContext() {
065: return null;
066: }
067:
068: public void setContext(Context context) {
069: }
070:
071: public boolean getIncluded() {
072: return false;
073: }
074:
075: public void setIncluded(boolean included) {
076: }
077:
078: public String getInfo() {
079: return null;
080: }
081:
082: public Request getRequest() {
083: return null;
084: }
085:
086: public void setRequest(Request request) {
087: }
088:
089: public ServletResponse getResponse() {
090: return null;
091: }
092:
093: public OutputStream getStream() {
094: return null;
095: }
096:
097: public void setStream(OutputStream stream) {
098: }
099:
100: public void setSuspended(boolean suspended) {
101: }
102:
103: public boolean isSuspended() {
104: return false;
105: }
106:
107: public void setError() {
108: }
109:
110: public boolean isError() {
111: return false;
112: }
113:
114: public ServletOutputStream createOutputStream() throws IOException {
115: return null;
116: }
117:
118: public void finishResponse() throws IOException {
119: }
120:
121: public int getContentLength() {
122: return -1;
123: }
124:
125: public String getContentType() {
126: return null;
127: }
128:
129: public PrintWriter getReporter() {
130: return null;
131: }
132:
133: public void recycle() {
134: }
135:
136: public void write(int b) throws IOException {
137: }
138:
139: public void write(byte b[]) throws IOException {
140: }
141:
142: public void write(byte b[], int off, int len) throws IOException {
143: }
144:
145: public void flushBuffer() throws IOException {
146: }
147:
148: public int getBufferSize() {
149: return -1;
150: }
151:
152: public String getCharacterEncoding() {
153: return null;
154: }
155:
156: public void setCharacterEncoding(String charEncoding) {
157: }
158:
159: public ServletOutputStream getOutputStream() throws IOException {
160: return null;
161: }
162:
163: public Locale getLocale() {
164: return null;
165: }
166:
167: public PrintWriter getWriter() throws IOException {
168: return null;
169: }
170:
171: public boolean isCommitted() {
172: return false;
173: }
174:
175: public void reset() {
176: }
177:
178: public void resetBuffer() {
179: }
180:
181: public void setBufferSize(int size) {
182: }
183:
184: public void setContentLength(int length) {
185: }
186:
187: public void setContentType(String type) {
188: }
189:
190: public void setLocale(Locale locale) {
191: }
192:
193: public Cookie[] getCookies() {
194: return null;
195: }
196:
197: public String getHeader(String name) {
198: return null;
199: }
200:
201: public String[] getHeaderNames() {
202: return null;
203: }
204:
205: public String[] getHeaderValues(String name) {
206: return null;
207: }
208:
209: public String getMessage() {
210: return null;
211: }
212:
213: public int getStatus() {
214: return -1;
215: }
216:
217: public void reset(int status, String message) {
218: }
219:
220: public void addCookie(Cookie cookie) {
221: }
222:
223: public void addDateHeader(String name, long value) {
224: }
225:
226: public void addHeader(String name, String value) {
227: }
228:
229: public void addIntHeader(String name, int value) {
230: }
231:
232: public boolean containsHeader(String name) {
233: return false;
234: }
235:
236: public String encodeRedirectURL(String url) {
237: return null;
238: }
239:
240: public String encodeRedirectUrl(String url) {
241: return null;
242: }
243:
244: public String encodeURL(String url) {
245: return null;
246: }
247:
248: public String encodeUrl(String url) {
249: return null;
250: }
251:
252: public void sendAcknowledgement() throws IOException {
253: }
254:
255: public void sendError(int status) throws IOException {
256: }
257:
258: public void sendError(int status, String message)
259: throws IOException {
260: }
261:
262: public void sendRedirect(String location) throws IOException {
263: }
264:
265: public void setDateHeader(String name, long value) {
266: }
267:
268: public void setHeader(String name, String value) {
269: }
270:
271: public void setIntHeader(String name, int value) {
272: }
273:
274: public void setStatus(int status) {
275: }
276:
277: public void setStatus(int status, String message) {
278: }
279:
280: }
|