How To Deploy Java Applications On Server?

The Linux hosting servers at provides you cPanel management, many Java applications ship in WAR packages which means Web Application Archive that you can easily install on your server.

Deploying Java WAR Packages:

There are two methods of deploying Java Application: The file manager interface and the command line interface. This lesson will focus on easier method i.e. via File Manager Interface.

For deploying a Java WAR package using the cPanel File Manager interface, first login to your cPanel and then navigate to cPanel’s File Manager interface from Home >> Files >> File Manager then follow the given steps:

  1. Select your public_html directory.
  2. Click New Folder to create a new folder
  3. Select your new folder in the center pane of the interface.
  4. Click Upload followed by Choose File.
  5. Browse the Java WAR package and then click Open.
  6. Select the file and click Rename.
  7. Change the file extension from .war to .zip and click Rename File.
  8. Select the .zip file and click Extract.
  9. Select the .htaccess file inside your public_html directory

If in case you do not see any .htaccess file then it must be kept hidden. To make the file visible click ‘Settings’ and tick ‘Show hidden files’ option. You can do same from the popup shown when you attempt to open your file manager.

Continue with the following steps:

  1. Click Edit followed by clicking Edit in the Text Editor
  2. Now enter the following text in the text box:
    SetHandler jakarta-servlet
    SetEnv JK_WORKER_NAME ajp13
  3. Save Changes your changes and access your Java application with the  URL.


  • represents your domain name
  • exampledirectory represents the Java application’s directory
  • examplejavaapplication represents the Java application’s name

That’s all. Your Java Application is now ready to use.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.