nico.ruti
nico.ruti

Reputation: 625

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!

Upvotes: 3

Views: 902

Answers (1)

nico.ruti
nico.ruti

Reputation: 625

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);

Upvotes: 6

Related Questions