Java examples for javax.servlet.http:HttpServletRequest
is IE via HttpServletRequest
import java.net.InetAddress; import java.net.UnknownHostException; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; public class Main{ public static boolean isIE(HttpServletRequest request) { return (request.getHeader("USER-AGENT").toLowerCase() .indexOf("msie") > 0 || request.getHeader("USER-AGENT") .toLowerCase().indexOf("rv:11.0") > 0) ? true : false; }// w ww . j a v a2s . c om }