title: Set Access-Control-Allow-Origin in Jetty
body: <p>I need to set "Access-Control-Allow-Origin" to "*" by code.</p>
  
  <p>Reading <a href="http://www.w3.org/wiki/CORS_Enabled#For_Jetty_.287_and_above.29" rel="nofollow">this</a> i've tried to set <code>org.eclipse.jetty.servlets.CrossOriginFilter</code> using <code>setInitParameter</code>:</p>
  
  <pre><code>        Server  server = new Server(activity.WEB_SERVER_PORT);  
          ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
  
          context.setWelcomeFiles(new String[] { "index.html" });
          context.setContextPath("/");
  
          context.setInitParameter("org.eclipse.jetty.servlets.CrossOriginFilter", "/*");
  
          TheServlet sv = new TheServlet();
          context.addServlet(new ServletHolder(sv),"/servleturl");
  
          server.setHandler(context); 
          try {
              server.start();
          } catch (Exception e) { }
  </code></pre>
  
  <p>But it doesn't work. How can I solve?</p>