Вопрос

My gwt compiled to production mode without any issues, but when I try to open the hosted.html file, all that I see is:

This html file is for Development Mode support.

Is this not the correct file or is there something wrong with my configuration or will it only work on a server?

Thanks.

Это было полезно?

Решение

The hosted.html file is used only in development mode, and its job is to connect your app to the DevMode browser plugin. It gets loaded when you launch your app appending the gwt.codesvr query parameter to the URL.

After you have compiled your application, you generally [*] need a server to host it on. To put it simply, launch the DevMode without the gwt.codesvr query parameter, your compiled files (those giant <hash>.cache.html) will be picked up instead the hosted.html).

* I mean generally because if you do not use any server-side technology, but only client side code (ultimately compiled to js), you'd simply need to open up your html host page (that is not hosted.html but your AppName.html inside the war directory). Fairly uncommon though.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top