Deploying application of Google Web Toolkit on Tomcat Server

Hi Everyone, in this blog post, I will describe about how to display the application for Google Web Toolkit in Apache Tomcat. Apache Tomcat is an open source web server and servlet container developed by the apache software foundation. Please check the reference for knowing more about tomcat server. This blog is based on my previous blog post - Sample Application in GWT. Please go through my previous blog post to get a better idea. In this post, I will be deploying the application, which I wrote in the previous blog in tomcat.

Deployment is the term used for installing an application in your server. In tomcat, the web application itself is setup in 2 different ways, which are :

  • Statically - The web application is setup in tomcat before it is started.
  • Dynamically - By directly manipulating already deployed applications or remotely by using tomcat web application manager.
Following are the steps to be followed to deploy the application in tomcat.
  • For deploying the application go to  workspace and select the name of the project you have created. 
  • Then go to the war folder and selct all the files and folder inside war folder.
  • Zip all the files and project into a file named project_name.zip. In my project, the name of the folder is SampleGWT.zip.
  •  Rename the project_name.zip to project_name.war. (Please note that project_name is the name of your gwt project.)
  • Then go to the webapps folder inside your tomcat directory.
  • Copy the war file to the webapps folder.
  • Now start the tomcat server. (For starting the tomcat server, go to bin folder inside tomcat directory and click the startup.bat file.)
  • When tomcat is started, we can see a folder name which have the name of your project is created in the webapps folder, which means the application is deployed on tomcat server.
  • To run the application, type http://localhost:8080/"Your_Project_Name" in a web browser.
A sample screen shot of the my application, which is deployed on tomcat server is as follows :


I hope this blog post give you enough idea about deploying a gwt application on tomcat server. If you have any doubts or any portions which you don't understood properly, please comment below. Every comments will be responded soon.

Thank you for reading the post.

References


Comments

Popular posts from this blog

Difference between "diff" and "sdiff" commands in Unix

Anonymous classes in C++