-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
executable file
·47 lines (35 loc) · 1.55 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Building the GZIP filter from src
----------------------------------
GZIP Filter Usage :
-------------------
Add the gzip-filter.jar included in this distribution
into your war's WEB-INF/lib directory. Register the gzip
filter in your web.xml as shown in the WEB-INF/web.xml
i.e.
<filter>
<filter-name>GZIPFilter</filter-name>
<filter-class>nagiworld.net.filters.gzip.GZIPFilter</filter-class>
</filter>
Mapping the Filter :
--------------------
Map all resources which can benefit from compression such as
.txt, .log, .html and .htm. You can also use the filter to compress output
from jsps and other dynamic content. Typically compressing certain image
types does not prove to be advantageous since they are already compressed
so make sure they are not mapped to the gzipfilter.
Example : also shown in the accompanying web.xml
<filter-mapping>
<filter-name>GZIPFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>GZIPFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
Building the gzip-filter.jar
----------------------------
The build.xml provided in the root directory of the gzipfilter can be used to compile and create the gzip-filter.jar. Run the following command to create a jar file:
ant jar
This creates a jar called gzip-filter.jar in the WEB-INF/lib directory. Please ensure that the servlet-api.jar is present in the $CLASSPATH
Enjoy!
Please post your feedback or comments to www.nagiworld.net.