1
votes

I have a Java application that can be deployed to a Tomcat 8 App Service from Eclipse using the Azure extensions.

I created a Build pipeline that creates artifacts with the .war file.

I then created a Release pipeline and set up a "Deploy WAR to Azure App Service". The pipeline deploys the war file and expands it, but some other configuration is not right because the app is not available on the Tomcat server.

Has anyone used this task to successfully deploy to a Tomcat 8 App Service? If so, what else needs to be done to get the app to deploy successfully?

P.S. I have very little experience with Java or Tomcat so it's likely something I've missed.

2
Why down vote my question?Eli Pulsifer
When would I "Deploy WAR to Azure App Service"? Can an app service host a war application without a Tomcat server?Eli Pulsifer

2 Answers

3
votes

Well, seems you deployed the WAR to Azure App Service (Azure Website) but not the Tomcat server.

You just need to deploy the WAR to Tomcat server instead of Azure Website.

  1. Build the Java project first, please refer to Working with Azure DevOps and Java and Build your code with Maven for details.
  2. Install the extension Apache Tomcat Deployment
  3. Deploy applications to a Tomcat server using the Deploy to Apache Tomcat task.

Reference below articles to do that:

0
votes

The Answer by Andy is most of the solution but there was one additional piece required to get the deployment working. I found this response to some additional errors I was getting after switching to the Apache Tomcat Deployment.

I also added a bash script to rename my app to ROOT cp my-war-file-name.war ROOT.war so that the app was the default application.