Thirumurthy
Thirumurthy

Reputation: 411

JSF web application not working in IE9. But it works fine in IE8

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.

Upvotes: 2

Views: 4582

Answers (2)

Cody
Cody

Reputation: 2491

I know this is an older question, but you probably are experiencing/experienced the same defect we did:

> <f:ajax/> not working at all in IE9 (normal mode) 
> Created: 18/May/11
> Component/s:  ajax 
> Affects Version/s: 2.1.1    
> Fix Version/s:    2.1.7, 2.2.0-m01

See the JIRA: https://java.net/jira/browse/JAVASERVERFACES-2063

The signal that this is the issue is if you are getting:

"malformedXML: Unable to get value of the property 'removeChild': object is null or undefined".

in your browser console.

The solution would be to move to 2.1.7 or later.

Upvotes: 0

Matt Handy
Matt Handy

Reputation: 30025

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

Notice that this should be the last resort. You should first try to solve your concrete problem (which is not clearly explained in your question) before using a filter.

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 {
    }
}

Upvotes: 1

Related Questions