Reputation: 1772
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.
I also tried to set the user agent in gwt.xml to:
<set-property name="user.agent" value="gecko1_8"/>
but that did not help.
Why does this happens? and how can I fix it?
Upvotes: 0
Views: 165
Reputation: 176
Often it is caused by corrupt cache. Stop the application server and delete the GWT compiled output from your war directory. With any luck, your recompiled Web App will now run as expected. You will soon become acquainted with the process as it is a annoying characteristic of the Eclipse GWT plugin. It's worth mentioning the IntelliJ IDE here because it is a superior compiler and does not suffer these puzzling quirks, however GWT support requires the Ultimate Edition ($).
A typical war
directory has the following structure:
The directory to delete is mywebapp
. This is be a fully qualified path of your WebApps GWT module (.gwt.xml) or more commonly, it is renamed to the rename
attribute defined in the same module. For example, MyWebApp.gwt.xml
may look like this:
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to="mywebapp">
<entry-point class="com.mywebsite.client.MyWebAppEntry"/>
<source path="client"/>
</module>
If the rename-to attribute wasn't defined, the GWT compiler would place a directory in your WAR directory called com.mywebsite.MyWebApp
. But because we defined the rename attribute, the GWT compiler simplifies the output by taking the shortened name from the module xml.
Don't forget to refresh the project if Eclipse complains the directory structure is out of sync with the project.
Upvotes: 2