3

We have web application with static content - html files, js files, images, etc.
There are byte order mark at the beginning of all html files.
These files were genereted by some tool. So I cannot modify them.
We deploy this application on Weblogic.
When I try to access this web application via direct link to Weblogic, then I have a lot of javascript errors.
But in case when I try to access this page via Apache proxy - then all is ok.
But Apache forwards all request direct to Weblogic.

And I do not have such errors in case if application was deployed on JBoss.
In this case I can access application both via direct link to JBoss and via proxy.

Anybody have some assumptions - why I cannot access application via direct link to Weblogic?

SOLUTION:
Add following mime mapping to web.xml:

   <mime-mapping>
      <extension>xml</extension>
      <mime-type>text/xml</mime-type>
   </mime-mapping>

   <mime-mapping>
      <extension>js</extension>
      <mime-type>text/javascript</mime-type>
   </mime-mapping>
Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133
  • When you try direct access, it could be the relative path issue or some static content prefix which is messing up the JS files. Are the *view source when rendered via Apache* showing the same URL to the JS files as you see in *View source when rendered directly via Weblogic* – JoseK Sep 23 '10 at 05:42
  • @VladimirBezugliy Please add your answer and accept it – fglez Mar 01 '13 at 12:05

1 Answers1

0

Add following mime mapping to web.xml:

   <mime-mapping>
      <extension>xml</extension>
      <mime-type>text/xml</mime-type>
   </mime-mapping>

   <mime-mapping>
      <extension>js</extension>
      <mime-type>text/javascript</mime-type>
   </mime-mapping>
Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133