如何在jetty或tomcat中添加自定义标头...用于IE边缘仿真?

时间:2013-07-16 10:46:42

标签: internet-explorer tomcat internet-explorer-9 jetty

我刚刚在添加

时检查了thread
  <customHeaders>
        <add name="X-UA-Compatible" value="IE=EmulateIE9" />
      </customHeaders>

如果有人可以帮助我,如果服务器不是IIS或Lamp堆栈,那么如何为IE添加此服务器参数,而不是jetty或tomcat?

1 个答案:

答案 0 :(得分:0)

在jetty中,您可以使用重写处理程序添加标题。

http://www.eclipse.org/jetty/documentation/current/jetty-handlers.html#rewrite-handler

或者如果你正在使用servlet,你可以使用servlet过滤器,因为这是servlet规范的一部分,它可以在jetty或tomcat上工作。

http://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html