Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Deploy Java Application on live server/ tomcat server How to?

Deploy Java Application

Learn to deploy Java application /website on live server/tomcat server. Different ways to deploy Java application. The software used to upload files etc.

For Java Tomcat Hosting provider Click Here.

There are two ways of how you can deploy your applications – via FTP or using Tomcat Manager.

Software required for FTP is FileZilla. Most of the people prefer it as the best for transferring files to the server. Download FileZilla client.

I. Deploy Java application by FileZilla FTP Client:

  1.  Upload your application web archive file (.war file) or directory with unpacked application. Place it into “/home/USERNAME/tomcat/webapps/area.deals/” directory.
  2. If you want to make the application be available at ‘/’ context, the WAR file should have the ‘ROOT.war’ name. In the case of uploading a directory with an unpacked application, the directory name should be ‘ROOT’. Otherwise, the application will be deployed and be available at Urls like YOURDOMAIN/war_file_name or YOURDOMAIN/directory_name accordingly.
  3. Tomcat automatically tracks changes, and deploys new applications, undeploys removed applications and applies changes to running applications. However, if the changes haven’t applied automatically within 10 minutes, please restart Tomcat.  via SSH or via the web interface in order to apply the changes and deploy your application manually.

II. Deploy Java application by Tomcat Manager:

Login to Tomcat Manager. If you have any troubles with login credentials for Tomcat Manager, you may find correct login info for Tomcat Manager application in the “/home/USERNAME/tomcat/conf/tomcat-users.xml” file.

If you have already uploaded application onto the server:

  1. Scroll down the page to the section called “Deploy directory or WAR file located on server”. Enter the context name preceded by “/”. (e.g.,”/myapp”) in the “Context Path” field.
  2. Leave the “XML Configuration file URL” filed blank.
  3. Locate WAR file and enter its absolute name. (e.g.,”/absolute/path/ROOT.war”) in the “WAR or Directory URL” field.
  4. Click the “Deploy” button. The page will reload.
  5. At the top of the page, verify that the message displayed is “OK – Deployed application at context path /myapp”. In the “Applications” section check that there is a line with the new application. The application is now ready and available at the specified URL.

 If application is on your local PC, get Apache tomcat installed on your PC:

The technique described in the previous section works if you are able to copy WAR file to the server’s file system. If there is no way to do that for some reason, you can still deploy an application using a “remote deployment” feature. Please follow these steps in order to do this:

  1. Locate the WAR file on your local machine and rename it to the context name with “war” extension. e.g., myapp.war or to ROOT.war.  (if ROOT name specified, application will be accessible at default context “/”).
  2.  Access the Tomcat Web Application Manager and scroll down to the section called “WAR file to deploy”.
  3. Click on the “Browse…” button and select needed .war file on your local machine.
  4. Click “Deploy”. The browser will upload selected .war file to the server and Tomcat will deploy it afterwards.

Kindly note that if WAR file is large, it’s better to use FTP (rather than cPanel file manager) for its uploading.

  • Read: Java hosting and its provider.

Feel free to comment if facing any difficulty. Like us on social to get updates.

The post Deploy Java Application on live server/ tomcat server How to? appeared first on Digital Workout.



This post first appeared on Gorahul - Get All The Details About Using, please read the originial post: here

Share the post

Deploy Java Application on live server/ tomcat server How to?

×

Subscribe to Gorahul - Get All The Details About Using

Get updates delivered right to your inbox!

Thank you for your subscription

×