Nicer, shorter, GWT url's
A thorn in the side of every GWT developer must be the ridiculous URLs it produces. Please, come and visit our wonderful webapp at ... very attractive... Of course, you can have http://company.com/thisapp/ redirect there, but still.
Fortunately, there is an easy way to shorten the URL, as explained in this not so aptly named thread in the Google Groups group on GWT. If you choose a decent module name, you end up with
http://company.com/module/Module.html, which is acceptable.
If you use the maven-gwt plugin to build your project, you need to modify both the compile targets and the run target to
code:
http://company.com/thisapp/com.company.app.module/Module.html
Fortunately, there is an easy way to shorten the URL, as explained in this not so aptly named thread in the Google Groups group on GWT. If you choose a decent module name, you end up with
http://company.com/module/Module.html, which is acceptable.
If you use the maven-gwt plugin to build your project, you need to modify both the compile targets and the run target to
code:
1
2
3
4
| <compileTargets>
<value>Module</value>
</compileTargets>
<runTarget>Module/Module.html</runTarget> |
|
|
Toeval is niet intuïtief |
|
|
Converting a certificate + key to a usable Java keystore |
Comments
What the hell is GWT?
It seems to be Google Web Toolkit.
By the way, in GWT 1.6 you should be a lot happier. We're moving to a more WAR style deployment model. In the new model, you'd actually put your HTML into the top of the war directory. It would then reference your module script which would be compiled into a subdirectory. There will also be controls withing your .gwt.xml file to make this subdirectory (and the script itself) shorter if you like.
Look something like this:
war/
war/Module.html
war/compiled/
war/compiled/myModule.nocache.js
Server side code would go into WEB-INF/classes as per normal.
Look something like this:
war/
war/Module.html
war/compiled/
war/compiled/myModule.nocache.js
Server side code would go into WEB-INF/classes as per normal.