Hallo!

To recognize the user’s browser version I examine the HttpHeader in a
request scoped managed bean:

        FacesContext ctx = FacesContext.getCurrentInstance();
        ExternalContext extctx = ctx.getExternalContext();
        Map<String, String[]> map = extctx.getRequestHeaderValuesMap();
        String arBrowser = map.get("User-Agent");
        String headBrowser = arBrowser[0];
        ....

This works well on WAS7 and JBoss.
But on WAS6.1 the map returns empty and then I get a ClassCastException:
        java.util.Vector$1 incompatible with [Ljava.lang.String;]

On the other AppServers the headBrowser returns the right value to
recognize the user’s browser.

I don’t know the reason why WAS6 behaves different. The differences I know are:
1.      WAS6.1 uses a (to me unknown) jsf-Version shipped with WAS6.1; the
other AppServers use jsf 1.2_15b02
2.      WAS6.1 runs with java 1.5; WAS7 and JBoss6 run with java 1.6

Can anyone tell me the reason why there are differences and can anyone
help me to make this function run also on WAS6.1?

Thanks,
Georg

Reply via email to