org.apache.catalina.ssi
public class ResponseIncludeWrapper extends HttpServletResponseWrapper
SSIServletExternalResolver
Version: $Revision: 708160 $, $Date: 2008-10-27 13:56:37 +0100 (Mon, 27 Oct 2008) $
| Field Summary | |
|---|---|
| protected ServletOutputStream | captureServletOutputStream
Our ServletOutputStream |
| protected long | lastModified |
| protected PrintWriter | printWriter |
| protected ServletOutputStream | servletOutputStream |
| Constructor Summary | |
|---|---|
| ResponseIncludeWrapper(ServletContext context, HttpServletRequest request, HttpServletResponse response, ServletOutputStream captureServletOutputStream)
Initialize our wrapper with the current HttpServletResponse and
ServletOutputStream.
| |
| Method Summary | |
|---|---|
| void | addDateHeader(String name, long value) |
| void | addHeader(String name, String value) |
| void | flushOutputStreamOrWriter()
Flush the servletOutputStream or printWriter ( only one will be non-null )
This must be called after a requestDispatcher.include, since we can't
assume that the included servlet flushed its stream. |
| String | getContentType()
Returns the value of the content-type header field.
|
| long | getLastModified()
Returns the value of the last-modified header field. |
| ServletOutputStream | getOutputStream()
Return a OutputStream, throws and exception if a printwriter already
been returned.
|
| PrintWriter | getWriter()
Return a printwriter, throws and exception if a OutputStream already
been returned.
|
| void | setContentType(String mime)
Sets the value of the content-type header field.
|
| void | setDateHeader(String name, long value) |
| void | setHeader(String name, String value) |
| void | setLastModified(long lastModified)
Sets the value of the last-modified header field.
|
Parameters: context The servlet context request The HttpServletResponse to use response The response to use captureServletOutputStream The ServletOutputStream to use
content-type header field.
Returns: the content type of the resource referenced by this
ResponseIncludeWrapper, or null if not known.
last-modified header field. The
result is the number of milliseconds since January 1, 1970 GMT.
Returns: the date the resource referenced by this
ResponseIncludeWrapper was last modified, or -1 if not
known.
Returns: a OutputStream object
Throws: java.io.IOException if the printwriter already been called
Returns: a PrintWriter object
Throws: java.io.IOException if the outputstream already been called
content-type header field.
Parameters: mime a mime type
last-modified header field.
Parameters: lastModified The number of milliseconds since January 1, 1970 GMT.