Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there way for a GWT program to tell if it's in hosted or web mode?

Tags:

java

gwt

I would like my GWT program to be able to determine whether it's in hosted mode or in web mode. Is there a way to do this?

Thanks!

like image 727
JP Richardson Avatar asked Oct 21 '08 20:10

JP Richardson


1 Answers

GWT.isScript() returns true in non hosted mode and false in hosted mode.

http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/core/client/GWT.html#isScript()

like image 160
Tony BenBrahim Avatar answered Sep 21 '22 14:09

Tony BenBrahim