Under nginx I know a option:
gzip_static on;
which allows to access the precompressed gzip
file with the same name, for example, if I have a file /var/www/style.css.gz
, when request http://localhost/style.css with header '
Accept-Encoding:gzip
the server will return the file on disk style.css.gz
as style.css
.
How can I do the same under Tomcat
?
Tomcat doesn't have this feature.
You could write a servlet/filter/etc. that can do it if you'd like.