To deploy a Java WAR package via the cPanel interface, navigate to cPanel's File Manager interface (cPanel >> Home >> Files >> File Manager) and perform the following steps:
- If the File Manager interface does not open in it, navigate to the
Click + Folder. The New Folderwindow will appear.
Enter the new folder's name in the New Folder Name: text box and click Create New Folder.
Select your new folder in the center pane of the interface.
Click Select File
- Browse to the Java WAR package and click Open.
- Select the file and click Rename.
- Change the file extension from
.zipand click Rename File.
- Select the
.zipfile and click Extract.
- Select the
.htaccessfile in the
- Click Edit.
- Click Edit in the Text Editor interface.
- Enter the following text in the text box:
SetHandler jakarta-servlet SetEnv JK_WORKER_NAME ajp13
11. Click Save Changes.
12. Access your Java application with the
example.comrepresents your domain name.
exampledirectoryrepresents the Java application's directory.
examplejavaapplicationrepresents the Java application's name.
If you do not see the
.htaccessfile inside your
public_htmldirectory, perform the appropriate steps for your version of cPanel & WHM:
- For cPanel & WHM version 64 and earlier, exit and then reenter cPanel's File Manager interface (cPanel >> Home >> Files >> File Manager). When you reenter the interface, select the Show Hidden Files (dotfiles) checkbox.
- For cPanel & WHM version 66 and later, click Settings, select the Show Hidden Files (dotfiles) checkbox, and then click Save.