title: Jersey + Spring loading a static html file with CORS
body: <p>I am using jersey server 1.19 and have this web.xml configuration:</p>
  
  <pre><code> &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
              &lt;param-value&gt;com.rest.jersey.serviceConfigurer&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest-api/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I am trying to load an .html file which is under my webapp/web folder.
  The file is loaded, however I can not seem to set Access-Control-Allow-Origin header to *</p>
  
  <p>When I change the url-pattern to /* It does set the Access-Control-Allow-Origin header to * but then the response from the server is a 404 error on the html file.</p>