Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gwt doesn't run in IE and Chrome in local file system

Tags:

gwt

Gwt application is client side only and it doesn't use any server side functionality.Application will be run from user's local file system. Builded application runs only in FireFox and doesn't work in IE and Chrome. Can anyone says what is the reason?

like image 863
Pavlo Avatar asked Nov 26 '25 20:11

Pavlo


2 Answers

GWT by default loads your compiled code in an iframe, and different files on the filesystem have different "origins", so the iframes cannot communicate with each others (they hit the Same Origin Policy). This is a security measure.

You can use the xs or the new (2.1) xsiframe linkers instead, that load code through <script> tags. Just add this to your gwt.xml:

<add-linker name="xsiframe" />
like image 166
Thomas Broyer Avatar answered Nov 28 '25 16:11

Thomas Broyer


Did you compile the permutations for IS and Chrome?

GWT creates special JavaScript per Browser and language. Perhaps you only compiled for FF ?

like image 40
Heiko Rupp Avatar answered Nov 28 '25 16:11

Heiko Rupp