0
votes

I have a Java web app that I want to deploy to Azure. I had a look at this tutorial and as I understood from it, what I basically need to do is in some way upload a ROOT.war file to the site/wwwroot/webapps/ directory, and jetty will take care of the deployment automagically. This works fine when I upload the file via FTP, however when I use OneDrive for synchronization, ROOT.war is uploaded but the deployment does not happen and I get a generic "This Java web app was deployed successfully but there is nothing here yet " page deployed to my web app. I don't think there's anything wrong with the folder structure in my OneDrive as ROOT.war does indeed get copied under /site/wwwroot/webapps/, it just doesn't get deployed.

So my question is, how does jetty actually deploy my Java web app to Azure, what is the protocol here?

1

1 Answers

0
votes

Based on my understanding, you want to do the deployment for your Java web app on Azure WebApps via sync content from OneDrive. So I think you need to refer to the offical tutorial Sync content from a cloud folder to Azure App Service to know how to do it.

However, the tutorial just introduce how to configure Deployment options (the same as Deployment Source in the tutorial) on Azure portal, but not tell us the file structure & path mapping between Azure WebApps and OneDrive.

You can try to browse the url of Kudu tool https://<your webapp name>.scm.azurewebsites.net/DebugConsole to access the file system of Azure WebApp.

Assumption that you had configured Deploymen options for OneDrive and Choose Folder like web4pp(my webapp name), it will create a folder with the same name in your OneDrive path Apps\Azure Web Apps. Then, the OneDrive path Apps\Azure Web Apps\<your chosed folder> is mapped to the Kudu path D:\home\site\wwwroot. Please see the figures below.

Fig 1. Configuration for deployment source from OneDrive enter image description here

Fig 2. File structure on OneDrive enter image description here

Fig 3. File structure on Azure WebApp Kudu tool enter image description here

So for syncing a Java webapp, you need to create a folder webapps at the OneDrive path Apps\Azure Web Apps\<your chosed folder>, and put your .war file into the folder, then click the Sync button on Azure portal as below. The Java app will be sync up to Azure WebApp.

enter image description here