public class CompressFilter extends GenericFilter
Description: 页面GZIP压缩,节省网络带宽
Title:首亨软件 - TSS/CRM等
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
ACCEPT_ENCODING
The header for accepted encodings
|
static java.lang.String |
CONTENT_ENCODING
The header for content encodings
|
| 构造器和说明 |
|---|
CompressFilter() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
Filters the response by wrapping the output stream, by checking
to see if the browser will accept gzip encodings, and if they
can, temporarily storing all of the response data and gzipping
it before finally sending it to the client
|
void |
printBanner(javax.servlet.ServletContext context)
启动时打印日志
|
destroy, doFilter, init, setFilterConfigpublic static final java.lang.String ACCEPT_ENCODING
public static final java.lang.String CONTENT_ENCODING
public void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilterInternal 在类中 GenericFilterrequest - the request to filterresponse - the response to filterchain - the FilterChain to participate injava.io.IOException - if there is a problem writing the data to the clientjavax.servlet.ServletException - for servlet problemspublic void printBanner(javax.servlet.ServletContext context)
printBanner 在类中 GenericFiltercontext - ServletContext object to use for logging