jetty 라이브러리를 받아두고
web.xml에 필터로 걸면된다.
<filter>
<filter-name>GzipFilter</filter-name>
<filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
<init-param>
<param-name>mimeTypes</param-name>
<param-value>text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
jetty 라이브러리 maven 주소는
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>8.1.15.v20140411</version>
</dependency>
8점대 까지는 jdk 1.6 이고 9점대 부터 jdk 1.9 이다
참조되어 오는 총 라이브러리는 아래와 같다
servlets
continuation
client
io
util
'java' 카테고리의 다른 글
java 향상된 for 문 (0) | 2016.08.05 |
---|---|
프로세스 실행 시간 측정 (0) | 2015.12.16 |
자바에서 Unsupported major.minor version 51.0 이런류의 에러 (0) | 2014.05.29 |
자바 시스템 시간 (0) | 2014.04.08 |
자바 ssl 적용 서블릿 필터 (0) | 2013.11.01 |