我需要检查浏览器的用户代理,看看它是否是 IE6。但是我不应该使用 scriptlet(我们有严格的 no scriptlets 政策)来做到这一点。
目前我使用
<%
String ua = request.getHeader( "User-Agent" );
boolean isMSIE = ( ua != null && ua.indexOf( "MSIE" ) != -1 );
%>
<% if( isMSIE ){ %>
<div>
<% } %>
使用 JSTL、EL 等而不是 scriptlet 的最简洁的方法是什么?