Short URL in your GWT project

url

If you are strugling with a long URL in the GWT project, you are at the right place! There is a small trick, which allows URL to be shorter.

From

https://domain.com/tomcat_context_path/project_name/your_index.html

To

https://domain.com/tomcat_context_path/

In order to shorten the URL, follow these 4 simple steps:

  1. Locate your “your_index.html” in the project
  2. Move it into your WAR/WebContent or whatever folder you use for the Tomcat deployment process
  3. Rename “your_index.html” to “index.html
  4. Adjust all links in “index.html” corresponding to your public folders (images/css/js and, of course, your main GWT-JS)

Now, after the new project deployment, your GWT project will be accessible under its new URL:

https://domain.com/tomcat_context_path/

There is no need to include the index.html file into the URL, simply because the Tomcat automatically searches for it (according to default settings of the Apache Tomcat server, of course). Finally, your GWT project will be accessible under its new URL!

Its simple trick, but greatly improves the user experience.

Contents