views:

208

answers:

2

I have got an application that is not compatible to work using IE8 browser.

I am looking for a way to to configure Tomcat on which this application run, so the pages could be read by IE8 and treated as if they are IE7 or IE6

By googling so far I found a possible suggestion which say to add to the http response the header: X-UA-Compatible: IE=EmulateIE7
here

that tell IE8 to be like IE7.

The problem is that this way requires adding a filter that should be added on application level. I'd like to know if any of you is familiar with a more generic way that Tomcat enables to send its http content to be IE7 (or IE6) compatible ?

A: 

Tomcat is a general purpose webserver and servlet container. It is absolutely browser-agnostic thus, there's no way to configure it in some special way to deal with IEs.

You don't have to add filter really. The bare minimum is to set the response header anywhere in "service" method (or doGet or doPost, whatever application uses):

res.addHeader("X-UA-Compatible", "IE=EmulateIE7 ");

But this is in case when there's a single entry point in the server application. Otherwise filter should do the job in a better way.

Juriy
A: 

See this forum thread that discusses exactly the same situation you are describing. It seems that a filter is the best way to go. As an answer at the above thread suggests, you could use Url Rewrite Filter.

Also, if you are using Apache Web Server to proxy Tomcat, you could easily configure it to add any header to the response.

kgiannakakis