Eclipse RAP应用程序中的浏览器检测

Eclipse RAP应用程序中的浏览器检测

问题描述:

我想知道是否可以在Eclipse RAP应用程序中检测浏览器(尤其是IE)。我想通知服务器客户端正在使用哪个浏览器,以便它可以显示适合的视图。Eclipse RAP应用程序中的浏览器检测

在此先感谢!

好像我问的问题太早。解决办法是:

String answer = RWT.getRequest().getHeader("User-Agent"); 
    boolean forInternetExplorer = (answer != null && answer.indexOf("MSIE") != -1);