English 中文(简体)
GWT 在 Firefox 中打开空
原标题:GWT opens empty in Firefox
  • 时间:2012-05-26 07:13:52
  •  标签:
  • gwt

I am starting my GWT application from eclipse in development mode.
It starts up fine in Chrome but in Firefox I get an empty window.
I have no errors in the console or the development console.
And when I start Firebug I can see all the elements (html/css etc) of my login screen.

我还试图在 gwt.xml 中设置用户代理 :

<set-property name="user.agent" value="gecko1_8"/>

这对於你们毫无裨益。

为什么发生这种事?我怎么解决呢?

最佳回答

通常它是由腐败缓存造成的 。 停止应用程序服务器并从您的战争目录中删除 GWT 编译的输出 。 幸运的是, 您重新编译的 Web App 现在将按预期运行 。 您很快会熟悉这个过程, 因为这是 Eclipse GWT 插件的一个令人讨厌的特性 。 值得提及的是 < a href=" http:// www.jetbrains. com/idea/" rel="nofollow" > IntelliJ IDE < / a >, 因为它是一个高级编译者, 并且不会遭受这些令人费解的奇数, 但是 GWT 支持需要超大版 ($) 。

典型的 war 目录有以下结构:

  • mywebapp/
  • WEB-INF/
  • index.html

要删除的目录是 mywebapp 。 这是您 WebApps GWT 模块(.gwt.xml) 的完全合格的路径, 或者更常见的路径, 它被重新命名为同一模块定义的 rename 属性。 例如, MyWebApp.gwt.xml 可能看起来像这样 :

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to="mywebapp">
    <entry-point class="com.mywebsite.client.MyWebAppEntry"/>
    <source path="client"/>
</module>

如果重命名属性没有定义, GWT 编译器会在您的 WAR 目录中设置一个名为 com.mywebsite.MyWebApp 的目录。但由于我们定义了重命名属性, GWT 编译器通过使用模块 xml 的缩略名称简化输出。

不要忘记,如果 Eclipse 抱怨目录结构与工程不同步, 请刷新工程 。

问题回答

暂无回答




相关问题
Refresh the UI in gwt

I have created some custom composite widget, which listens to an events (in my case loginEvent). Once the event is caught the state of the widget changes so as the way it should look (in my case I ...

How to create a development/debug and production setup

I recently deployed inadvertently a debug version of our game typrX (typing races at www.typrx.com - try it it s fun). It was quickly corrected but I know it may happen again. After digging on ...

GWT error at runtime: ....style_0 is null

My code works fine in IE 8, but on firefox 3.5, the javascript fails to load. I used firebug to figure out why, and the error I get is (GWT detailed mode) My suspicion is that some style is not ...

GWT s hosted mode not working

I ve been stumped for a while trying to figure out why my GWT demo app isn t working in hosted mode so I went back and downloaded the Google Web Toolkit again, unzipped it and simply went to the ...

How to disable Google Visualizations Tool Tips?

Does anyone know how to disable the tool-tip boxes that popup when a Google Visualizations chart is clicked (Selected)? Following the sample code at Getting Started with Visualizations, the "...

GWT 2 CssResource how to

I have a GWT 1.7 application and I want to upgrade it to GWT 2 Milestone 2. The application uses 2 big external CSS files. In GWT 1.7 I had a public folder and put both the CSS files in the folder and ...

热门标签