如何在生产模式下运行GWT [英] How to run GWT in production mode

查看:142
本文介绍了如何在生产模式下运行GWT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照 https://的说明运行生产模式下的GWT项目。 developers.google.com/web-toolkit/usingeclipse 。因此,我的项目 foo 位于我的桌面下的文件夹 foo ,位于工作区文件夹。当我右键单击项目资源管理器中的 foo 项目时,单击 Google - GWT编译,我在调试控制台中看到一些消息,如排列1,2 .. 等,之后它说编译完成。 >

但是,与Google页面所说的相反,没有额外的 HTML / Javascript 文件在 war 文件夹中生成。另外,如果我在网址栏中输入 foo / war / foo.html ,我会收到超时错误(即使该页面只包含一个简单的 alert call)。



任何人都可以告诉我这里发生了什么?

解决方案

如果您在编译后运行GWT开发模式



删除参数 gwt .codesvr = 127.0.0.1:9997 在eclipse中给出的url



编译代码后,整个gwt代码将转换为 javascript ,所以您可以像正常的 HTML 页面一样访问。


I am trying to run GWT project in production mode, as per the instructions at https://developers.google.com/web-toolkit/usingeclipse. So my project foo is located as a folder foo in my desktop under th workspace folder. When I right click on the foo project in the Project Explorer, click Google - GWT Compile, I see some message like permutations 1, 2.. etc in the debugging console, after which it says that compilation is complete.

However, contrary to what the Google page says, no additional HTML/Javascript files are generated in the war folder. Also, if I enter foo/war/foo.html in the URL bar, I am getting a timed-out error (even though the page contains only a simple alert call).

Can anyone tell me what is going on here?

解决方案

If you are running in GWT development mode after the compile

remove the parameter gwt.codesvr=127.0.0.1:9997 in the url given by eclipse

After you compile the code the whole gwt code will convert in to javascript so you can access like an normal HTML page with proper paths .

这篇关于如何在生产模式下运行GWT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆