public class IncludableGzipFilter extends GzipFilter
GzipFilter that uses Jetty features to allow
headers to be set during calls to
RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse).
This allows the gzip filter to function correct during includes and to make a decision to gzip or not
at the time the buffer fills and on the basis of all response headers.
If the init parameter "uncheckedPrintWriter" is set to "true", then the PrintWriter used by
the wrapped getWriter will be UncheckedPrintWriter.| Modifier and Type | Class and Description |
|---|---|
class |
IncludableGzipFilter.IncludableGzipStream |
class |
IncludableGzipFilter.IncludableResponseWrapper |
_bufferSize, _excluded, _mimeTypes, _minGzipSize| Constructor and Description |
|---|
IncludableGzipFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(javax.servlet.FilterConfig filterConfig) |
protected GzipResponseWrapper |
newGzipResponseWrapper(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Allows derived implementations to replace ResponseWrapper implementation.
|
protected PrintWriter |
newWriter(OutputStream out,
String encoding)
Allows derived implementations to replace PrintWriter implementation.
|
destroy, doFiltergetUserAgent, getUserAgentpublic void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterinit in class GzipFilterjavax.servlet.ServletExceptionUserAgentFilter.init(javax.servlet.FilterConfig)protected GzipResponseWrapper newGzipResponseWrapper(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
GzipFilternewGzipResponseWrapper in class GzipFilterrequest - the requestresponse - the responseprotected PrintWriter newWriter(OutputStream out, String encoding) throws UnsupportedEncodingException
GzipFilternewWriter in class GzipFilterout - the outencoding - the encodingUnsupportedEncodingExceptionCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.