|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.filter.CompressionFilter
CompressionFilter
Copyright 2003 Jayson Falkner (jayson@jspinsider.com) This code is from "Servlets and JavaServer pages; the J2EE Web Tier", http://www.jspbook.com. You may freely use the code both commercially and non-commercially. If you like the code, please pick up a copy of the book and help support the authors, development of more free code, and the JSP/Servlet/J2EE community.
Field Summary |
Constructor Summary | |
CompressionFilter()
|
Method Summary | |
void |
destroy()
Called when the filter is taken out of service |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
Filter a request looking for the "accept-encoding" HTTP header and if available, send compressed content. |
void |
init(javax.servlet.FilterConfig filterConfig)
Initialize the CompressionFilter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompressionFilter()
Method Detail |
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
filterConfig
- FilterConfig object
javax.servlet.ServletException
- If there is an error initializing the filterpublic void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
req
- Requestres
- Responsechain
- Filter chain
java.io.IOException
- If there is an error writing the response
javax.servlet.ServletException
- If there is an error processing the requestpublic void destroy()
destroy
in interface javax.servlet.Filter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |