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, _excludedAgentPatterns, _excludedAgents, _excludedPathPatterns, _excludedPaths, _mimeTypes, _minGzipSize
Constructor and Description |
---|
IncludableGzipFilter() |
Modifier and Type | Method and Description |
---|---|
void |
init(FilterConfig filterConfig) |
protected GzipResponseWrapper |
newGzipResponseWrapper(HttpServletRequest request,
HttpServletResponse response)
Allows derived implementations to replace ResponseWrapper implementation.
|
protected PrintWriter |
newWriter(OutputStream out,
String encoding)
Allows derived implementations to replace PrintWriter implementation.
|
destroy, doFilter
getUserAgent, getUserAgent
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
init
in class GzipFilter
ServletException
UserAgentFilter.init(javax.servlet.FilterConfig)
protected GzipResponseWrapper newGzipResponseWrapper(HttpServletRequest request, HttpServletResponse response)
GzipFilter
newGzipResponseWrapper
in class GzipFilter
request
- the requestresponse
- the responseprotected PrintWriter newWriter(OutputStream out, String encoding) throws UnsupportedEncodingException
GzipFilter
newWriter
in class GzipFilter
out
- the outencoding
- the encodingUnsupportedEncodingException
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.