Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:51:43+00:00 2026-06-12T03:51:43+00:00

I have this Maven project built with the gwt-maven-archetype. While it runs perfectly with

  • 0

I have this Maven project built with the gwt-maven-archetype. While it runs perfectly with the mvn gwt:run goal, however when i try to run it in the tomcat7 container either mvn tomcat:run or mvn gwt:compile && mvn tomcat:run it does not load the GWT Dynamically created widgets.

According to the Google Chrome console it cannot find the *.nocache.js file even though in the /target/ folder it is exactly where it is expected to be.

I am currently trying to display a simple “Hello” Label in the Entry Point Module :

GWT Entry Point

public class Hello implements EntryPoint {


    public void onModuleLoad() {    
        Label hello = new Label("TESTESTSTSTS");

        RootPanel.get("helloContainer").add(hello);

    }

}

*.html

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link type="text/css" rel="stylesheet" href="veltisto.css">
    <title>Web Application Starter Project</title>
    <script type="text/javascript" language="javascript" src="veltisto/veltisto.nocache.js"></script>
  </head>
  <body>
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
    <noscript>
      <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>
    <div id="helloContainer"></div>
  </body>
</html>

POM.XML

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <!-- POM file generated with GWT webAppCreator -->
    <modelVersion>4.0.0</modelVersion>
    <groupId>gr.veltisto</groupId>
    <artifactId>web</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>GWT Maven Archetype</name>

    <properties>
        <!-- Convenience property to set the GWT version -->
        <gwtVersion>2.4.0</gwtVersion>
        <!-- GWT needs at least java 1.5 -->
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwtVersion}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwtVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
            <classifier>sources</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.gwtbootstrap</groupId>
            <artifactId>gwt-bootstrap</artifactId>
            <version>2.0.4.0</version>
        </dependency>
    </dependencies>

    <build>
        <!-- Generate compiled stuff in the folder used for developing mode -->
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

        <plugins>

            <!-- Copy static web files before executing gwt:run -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <executions>
                        <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>exploded</goal>
                                </goals>
                        </execution>
                </executions>
                <configuration>
                    <webappDirectory>${webappDirectory}</webappDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.0</version>
                <configuration>             
                    <path>/veltisto</path>
                </configuration>
            </plugin>


            <!-- GWT Maven Plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>2.4.0</version>
                <executions>
                    <execution>
                                <goals>
                            <goal>compile</goal>
                                </goals>
                        </execution>
                </executions>
                <!-- Plugin configuration. There are many available options, 
                   see gwt-maven-plugin documentation at codehaus.org -->
                <configuration>
                    <runTarget>veltisto.html</runTarget>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

*.GWT.XML

<module rename-to='veltisto'>
    <!-- Inherit the core Web Toolkit stuff. -->
    <inherits name='com.google.gwt.user.User' />
    <inherits name="com.google.gwt.uibinder.UiBinder" />
    <!-- We need the JUnit module in the main module, -->
    <!-- otherwise eclipse complains (Google plugin bug?) -->
    <inherits name='com.google.gwt.junit.JUnit' />

    <!-- Inherit the default GWT style sheet. You can change -->
    <!-- the theme of your GWT application by uncommenting -->
    <!-- any one of the following lines. -->
    <inherits name='com.google.gwt.user.theme.standard.Standard' />
    <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
    <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

    <!-- Other module inherits -->

    <inherits name="com.google.gwt.uibinder.UiBinder" />
    <inherits name="com.github.gwtbootstrap.Bootstrap" />

    <!-- Specify the app entry point class. -->
    <entry-point class='gr.veltisto.web.client.Hello' />

    <!-- Specify the paths for translatable code -->
    <source path='client' />
    <source path='shared' />

</module>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:51:44+00:00Added an answer on June 12, 2026 at 3:51 am

    tomcat7:run only uses the src/main/webapp. You’ll want to use tomcat7:run-war (which will do a package) or tomcat7:run-war-only (if you already have a war:exploded structure).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a project built with maven-archetype-webapp artifact. The default packaging for this
I have imported a GWT project from GIT , but when i run maven
I have followed this guide: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html I have created a maven-plugin project hello-maven-plugin with
I have this task for the project with 4 nested subprojects using Maven: For
I have a multiple maven project like this: root/ ----war ----jar1 ----jar2 ----jar3 The
I have a Maven (3.0.3) / GWT (2.4) project. I'm trying to write some
I have a maven-based GWT project that includes Guava. I am running into trouble
I have a project (built from an AppFuse template) that requires Maven 2.2.1. So
I have a multi module project like this: gwt-app model webapp (depends on gwt-app
I have a pom file that looks similar to this <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.