JSF的Web应用程序在IE9无法正常工作。但在IE8中正常工作 [英] JSF web application not working in IE9. But it works fine in IE8

查看:231
本文介绍了JSF的Web应用程序在IE9无法正常工作。但在IE8中正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发使用JSF 2.0 Web应用程序。它在IE 8和其他浏览器(Firefox和谷歌Chrome)工作的罚款。但它不是在IE9工作。能否请您解释JSF的IE9的兼容性,可以怎样做,这样我可以让我的应用程序工作在IE9。

I have developed web application using JSF 2.0. It is working fine in IE 8 and other browsers (firefox and google chrome). But it is not working in IE9. Can you please explain the IE9 compatibility for JSF and how it could be done so that I can make my App works in IE9.

推荐答案

我们也有一些问题,IE9和我们的解决方法是使用过滤器,告诉IE9在兼容模式下工作。

We also had some issues with IE9 and our workaround was to use a filter that tells the IE9 to work in compatibility mode.

注意,这应该是最后的手段。你应该首先尝试使用过滤器之前为您解决具体问题(这是不明确你的问题解释)。

兼容性模式使IE9松动圆角。

The compatibility mode causes IE9 to loose rounded corners.

@WebFilter("*.xhtml")
public class CompatibilityFilter implements Filter {

    public CompatibilityFilter() { }

    public void doFilter(ServletRequest request, ServletResponse res,
            FilterChain chain) throws IOException, ServletException {
        HttpServletResponse resp = (HttpServletResponse) res;
        resp.addHeader("X-UA-Compatible", "IE=EmulateIE8");
        resp.addHeader("Cache-Control", "no-cache, must-revalidate");
        chain.doFilter(request, resp);
    }

    public void destroy() { }

    public void init(FilterConfig fConfig) throws ServletException {
    }
}

这篇关于JSF的Web应用程序在IE9无法正常工作。但在IE8中正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆