Over a million developers have joined DZone.

Getting Rid of Package-Based GWT URL's

· Java Zone

Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management, brought to you in partnership with Stormpath.

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.

The Java Zone is brought to you by Stormpath—offering a complete, pre-built User Management API for building web and mobile applications, and APIs. Download our new whitepaper: "Build Versus Buy: Customer Identity Management for Web and Mobile Applications".

Topics:

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

{{ parent.tldr }}

{{ parent.urlSource.name }}