Thursday, May 24, 2012

Re: Root path for a GWT application

Hi Thomas,

Thanks for the answer !

My application is already deployed in the root context of the application server (JBoss 7). The bar in the url seems to be coming for the GWT module name (rename-to section in the GWT.xml file). Is there a way to remove the name of the GWT module ?

David




On Tuesday, May 22, 2012 2:18:08 PM UTC+2, David Wery wrote:
Hi all,

I'm currently building a GWT application but my customer does not want to see anything in the URL path except the domain. For example, I have actually the application deployed on the URL : http://www.foo.com/bar/Bar.html (where bar is the module name) and we actually want only http://www.foo.com.

How to achieve this ?

Nothing to do with GWT actually, more with your deployment.

Assuming you're use Java on the server too, and deploying as a WAR into something like Tomcat or Jetty, then to remove the '/bar/' context-path, the easiest is to simply rename your war into ROOT.war (for Tomcat) or root.war (for Jetty).

To remove the need for the "Bar.html" part, rename your page as "index.html" or add the following to your web.xml:
<welcome-file-list>
  <welcome-file>Bar.html</welcome-file>
</welcome-file-list>
https://developers.google.com/appengine/docs/java/config/webxml#The_Welcome_File_List (not specific to AppEngine, see the links to the specs at the top of the page)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/yXjHPUMsFywJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment