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

没有正确的解决方案

其他提示

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();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top