Search code examples
javainternet-explorerbrowserbrowser-detectioneclipse-rap

Browser detection in a Eclipse RAP application


I was wondering if it is possible to detect the browser (especially IE) in a Eclipse RAP application. I'd like to inform the server about what browser the client is using, so that it can show adapted views.

Thanks in advance!


Solution

  • Seems like I asked the question too early. The solution is:

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