title: How to prevent caching of static files in embedded Jetty instance?
body: <p>I want to prevent my CSSs from being cached on the browser side. How can I do it in embedded Jetty instance?</p>
  
  <p>If I were using xml configuration file, I would add lines like:</p>
  
  <pre><code>&lt;init-param&gt;
    &lt;param-name&gt;cacheControl&lt;/param-name&gt;
    &lt;param-value&gt;max-age=0,public&lt;/param-value&gt;
  &lt;/init-param&gt;
  </code></pre>
  
  <p>How I can turn that into the code? </p>
  
  <p>Right now I start Jetty this way:</p>
  
  <pre><code>BasicConfigurator.configure();
  
  Server server = new Server();
  SocketConnector connector = new SocketConnector();
  // Set some timeout options to make debugging easier.
  // 1 hour
  connector.setMaxIdleTime( 1000 * 60 * 60 );
  connector.setSoLingerTime( -1 );
  connector.setPort( 8081 );
  server.setConnectors( new Connector[] { connector } );
  
  WebAppContext bb = new WebAppContext();
  bb.setServer( server );
  bb.setContextPath( "/" );
  bb.setWar( "src/webapp" );
  
  server.addHandler( bb );
  </code></pre>
  
  <p>I think I should search setControlCache somewhere in the WebAppContext area of responsibility.</p>
  
  <p>Any advices on this?</p>