I enter the thread despite there are already appropriate answers
because I guess you miss something that'll help you understand
those...

On 10 oct, 10:46, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Is there any way to shorten the URL without changing the package
> structure?
>
> basically i would like to shorten the
> "com.google.gwt.sample.showcase.Showcase" bit from the following url:
>
> http://localhost:8888/com.google.gwt.sample.showcase.Showcase/Showcas...

This is running in Hosted Mode (GWTShell). The hosted mode needs to
know the full module name to find it in the classpath, so you cannot
shorten this URL.

However, as soon as you compile your app for you users to "consume"
it, you get in the "-out" dir a
com.google.gwt.sample.showcase.Showcase subfolder containing the
compiled app: you don't need to copy the subfolder, you can just copy
its *content* to whichever place you like (including your HTTP
server).

You don't need your "welcome page" to follow some naming convention
either (the showcase sample uses a Showcase.html but it could be
renamed index.html without side-effects), so you can very well put
your GWT app at the root of your "production" server: e.g.
http://my-site.example.com/

GWT.getModuleBaseURL() and GWT.getHostPageBaseURL() will always give
you the appropriate URL based on the location the page has been loaded
from (they'll return "http://my-site.example.com/"; in the above case).

So you don't have your users "remember and then type 50+ chars", *you*
choose the URL of your app !
...once compiled and deployed, not in hosted mode (but hosted mode
isn't for production use)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to