JSF 2 : Detect Browser type using EL Expression

In facelet, we can get the browser information via EL expression like this :
#{request.getHeader('User-Agent')}

by using jstl function containsIgnoreCase, we can check for specific browser.

For example, if we want to load specific css file for IE6, this will work :


add xmlns:fn="http://java.sun.com/jsp/jstl/functions" to the <html> to use jstl functions.

0 comments:

Post a Comment