title: Weblogic and BOM
body: <p>We have web application with static content - html files, js files, images, etc.<br>
  <strong>There are byte order mark at the beginning of all html files.</strong><br>
  These files were genereted by some tool. So I cannot modify them.<br>
  We deploy this application on Weblogic.<br>
  When I try to access this web application via direct link to Weblogic, then I have a lot of javascript errors.<br>
  But in case when I try to access this page via Apache proxy - then all is ok.<br>
  But Apache forwards all request direct to Weblogic.  </p>
  
  <p>And I do not have such errors in case if application was deployed on JBoss.<br>
  In this case I can access application both via direct link to JBoss and via proxy.</p>
  
  <p>Anybody have some assumptions - why I cannot access application via direct link to Weblogic?</p>
  
  <p><strong>SOLUTION:</strong><br>
  Add following mime mapping to web.xml:  </p>
  
  <pre><code>   &lt;mime-mapping&gt;
        &lt;extension&gt;xml&lt;/extension&gt;
        &lt;mime-type&gt;text/xml&lt;/mime-type&gt;
     &lt;/mime-mapping&gt;
  
     &lt;mime-mapping&gt;
        &lt;extension&gt;js&lt;/extension&gt;
        &lt;mime-type&gt;text/javascript&lt;/mime-type&gt;
     &lt;/mime-mapping&gt;
  </code></pre>