Question

Im using vaadin 6.8.5, I need to set the user-agent header of a browser depending upon the OS(Android,Iphone,Firefox,Chrome) the user selects. How to set a particular user agent to the browser. im using Vaadin Embedded to display the external URL . I have to set user agent to this vaadin embedded component.Please help me to come up with a solution...

Regards, M.Vignesh

No correct solution

OTHER TIPS

So now how to get the user agent of the embedded browser ? Is there any way to get this?

To get the user-agent string do the following:

Vaadin7:

WebBrowser webBrowser = Page.getCurrent().getWebBrowser();
webBrowser.getBrowserApplication(); // Get the browser user-agent string.

Vaadin6:

WebBrowser browser = (WebBrowser) myApplication.getMainWindow().getTerminal();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top