Deploying a WebClient application as a WAR file

Deploying a WebClient application as a WAR file

You can deploy your WebClient application by exporting it to a WAR file and then publish it to a Tomcat server, to do this follow these steps:

  1. Installing the Tomcat server service
    a. Download the Tomcat service installer from the Tomcat official page http://tomcat.apache.org/ , we recommend to use the version Tomcat 8.5 or higher




    IMPORTANT:  Please be sure that you download the Windows Service Installer and not a compressed package from the selected Tomcat version that you will use.


    b. 
    Install the Tomcat service, please take a note of the port numbers that you set in the configuration options during the installation process, these are the port numbers that the Tomcat server will use once its service starts.



    c. Once the installation completes ,you can search for "configure tomcat" and make sure it says the service is running.




  2.  Export your WebClient application to a WAR file 
    a. In Eclipse, make right-click over your web project and then go to Export -> WAR file



    b. 
    In the Export window, select the destination folder in which the WAR file will be created, also check that your web project is selected


    c. Click on the “Finish” button and wait until the export process is completed, check the destination folder to see that the WAR file was created



  3. Publish your WAR file 
    a. 
    Stop the Tomcat service by clicking the option “Stop”.

    b. Copy your WAR file and paste it inside the webapps folder that is located in the installation folder from your Tomcat version (example C:\Program Files\Apache Software Foundation\Tomcat 10.1\webapps)


    c. Starts the Tomcat service by clicking the “Start” button once the service is started a new folder with the same name that your WAR file must be automatically created inside the webapps folder.



    d. Test your application, use the same port number that the one you set on the configuration window during the installation process for the Tomcat service.