jbosshttp-headersportletjboss-portalx-ua-compatible

Adding custom property to every HTTP header in portlet


I can't add the tag

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

to the <header-content> section in my <portlet> configured in the jboss-portlet.xml file because <meta> tags are not supported by JBoss.

I now want to add

X-UA-Compatible: IE=EmulateIE7

to every HTTP header on this portlet. Is this somehow possible?

For more information on X-UA-Compatible see http://blogs.msdn.com/b/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx. I'm using JBoss 4.2.3.GA.


Solution

  • There is the doHeaders(...) method that get's invoked when I set

    <container-runtime-option>
        <name>javax.portlet.renderHeaders</name>
        <value>true</value>
    </container-runtime-option>
    

    in my portlet.xml (see here for more details).

    But unfortunately all the properties I set there are somewhere lost on the way to the client.