How to configure embedded Jetty (v9) to set specific headers for specific resource files?
<p>Is it possible to configure embedded Jetty (v9) to set specific headers for specific resource file types only.</p>

<p>At the moment, I'm not doing anything special to handle static resources, so presumably Jetty has some default handler setup to do that. Is it possible to extend or overload that default handler with some custom setup so that I can set the <code>Cache-Control</code> header for <code>html</code> files only?</p>

<p>I'm trying to accomplish something analogous to the following bit of Apache config:</p>

<pre><code>&lt;Files "*.html"&gt;
  Header set Cache-Control "public, max-age=900"
&lt;/Files&gt;
</code></pre>

<p>...in my Jetty setup: </p>

<pre><code>public static void main(String[] args) throws Exception {
    Server server = new Server(443);
    WebAppContext webapp = new WebAppContext();
    webapp.setContextPath("/");
    webapp.setWar("war");
    server.setHandler(webapp);
    ...
    ...
}
</code></pre>

<p>Actually, if this can be accomplished in jetty.xml or some other configuration file, that would be preferable.</p>