1
votes

We have a GWT application. Using Maven 3 we build and run the GWT application. The application runs fine when we build and run on Windows 7 and test on IE on Windows. However, when we compile and run the application on Linux and then test on IE on Windows, the application looks differently. To rule out client problems: we test on exactly the same client - Internet Explorer on Windows 7. Further investigation revealed the Javascript on the Linux-server is differently from the Javascript on the Windows-server.

Does anyone know why GWT behaves differently on Linux and Windows? What can we do have GWT behave the same on both Windows and Linux. We use Maven 3 to compile and run gwt.

Here's the plugin configuration of GWT:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>gwt-maven-plugin</artifactId>
  <version>2.5.0</version>
  <executions>
    <execution>
      <goals>
        <goal>compile</goal>
        <goal>i18n</goal>
        <goal>generateAsync</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <runTarget>MyApplication.html</runTarget>
    <hostedWebapp>${webappDirectory}</hostedWebapp>
    <i18nMessagesBundle>nl.my.app.client.Messages</i18nMessagesBundle>
    <inplace>true</inplace>
  </configuration>
</plugin> 

and here's the module configuration:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='MyApplication'>
    <inherits name='com.google.gwt.user.User' />
    <inherits name="com.google.gwt.i18n.I18N" />
    <inherits name='nl.my.module' />
    <inherits name="com.sencha.gxt.ui.GXT" />
    <inherits name="com.google.common.collect.Collect" />
    <inherits name='com.google.gwt.user.Debug' />
    <inherits name='nl.my.othermodule' />

    <entry-point class='nl.my.MYApplication' />

    <source path='client' />
    <source path='shared' />

    <set-configuration-property name="UiBinder.useSafeHtmlTemplates" value="true" />

    <extend-property name="locale" values="nl_NL" />
</module>

The application is build and run using the following command: mvn gwt:run

2
What are the differences between the compiled outputs? - Thomas Broyer

2 Answers

0
votes

You probably have different JDKs on the two different systems. Ensure the JDK being used by maven is the same.

0
votes

We found the problem - compatibility mode: as stated in the question the problem only occurred in Internet Explorer (IE). The compatibility mode of IE was enabled automatically when we'd access the application via a non-local address. In compatibility mode IE behaves slightly different. That's why, when we did access the application via localhost - on our development workstation - compatibility mode was not enabled by IE and the application looked like it should.

Problem was solved by adding the following in the head section of the application's single html file:

<meta http-equiv="X-UA-Compatible" content="IE=edge" >