Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Getting Rid of Package-Based GWT URL's

DZone's Guide to

Getting Rid of Package-Based GWT URL's

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

Deploying a fancy GWT application loses a lot of its shine when you see a my.package.gwt url in your browser. To get rid of this, you only need two extra lines of configuration in your application module:

<module>
    <source path="my/package/gwt"/>
    <public path="gwt/public"/>
    <inherits name='com.google.gwt.user.User'/>
    <entry-point class='my.package.gwt.Application'/>
    <stylesheet src="gwt.css"/>
</module>

This source node points to the Java application implementation, the public node to the application's resources. 

There's one thing you need to keep in mind, though: both paths are considered to be relative to the module configuration file.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}