How do I programmatically set gzip in Jetty?
问题 I'm writing a web app using Noir and clojure, which uses Jetty. Jetty has two ways of using gzip, one for static, and one for dynamic, they are described in https://stackoverflow.com/a/9113129/104021. I want to turn on both static and dynamic gzipping, but our project doesn't use web.xml files, and doesn't want to start. How do I programmatically set jetty to use gzip (ie without having a web.xml)? 回答1: In a Compojure app I'm working on, I have a Ring/Jetty adapter based on ring-jetty-adapter