|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.filter.SimpleCompressionFilter
Filter that compresses output with gzip (assuming that browser supports gzip).
Taken from More Servlets and JavaServer Pages from Prentice Hall and Sun Microsystems Press, http://www.moreservlets.com/. © 2002 Marty Hall; may be freely used or adapted.
Constructor Summary | |
SimpleCompressionFilter()
|
Method Summary | |
void |
destroy()
Called when filter taken out of service |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
If browser does not support gzip, invoke resource normally. |
protected javax.servlet.FilterConfig |
getFilterConfig()
Retrieve the FilterConfig object |
void |
init(javax.servlet.FilterConfig config)
Store the FilterConfig object in case subclasses want it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleCompressionFilter()
Method Detail |
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, java.io.IOException
doFilter
in interface javax.servlet.Filter
javax.servlet.ServletException
java.io.IOException
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
protected javax.servlet.FilterConfig getFilterConfig()
FilterConfig
object
FilterConfig
public void destroy()
destroy
in interface javax.servlet.Filter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |