How to Deploy JavaScript DOCX Editor Java Web API in Azure App

28 Aug 20261 minute to read

Prerequisites

Ensure you have an Azure account and the Azure CLI installed in your environment.

You can get the example web service project from GitHub and then perform the following steps to build the package and host it in an Azure App Service.

Step 1: Clean and package the application using the following command.

mvn clean package

Step 2: Run the application locally to verify the build using the following command.

mvn spring-boot:run

Step 3: Build the final package using the following command.

mvn package

The above package-generation command creates the **tomcat-0.0.1-SNAPSHOT.war** in the following location in the sample folder.

target/tomcat-0.0.1-SNAPSHOT.war

Step 4: Create an Azure App Service with Java & Tomcat. For example, create an App Service named documenteditorjava.

Step 5: After creating the App Service, navigate to the Advanced Tools option under Development Tools.

Advanced tools

Then, click Go and select the CMD option under Debug console.

Debug console

Step 6: Once the file manager is opened, navigate to

site -> wwwroot -> webapps

Step 7: Now, upload the generated WAR file tomcat-0.0.1-SNAPSHOT.war. The uploaded WAR file is extracted automatically, as shown below:

Uploaded war

Step 8: Browse to the app.

Browse to the deployed app at http://<app_name>.azurewebsites.net (for example, http://documenteditorjava.azurewebsites.net). Navigating to this link opens the DOCX Editor Web API at http://documenteditorjava.azurewebsites.net/tomcat-0.0.1-SNAPSHOT, which returns the default GET-method response.

Append the running App Service URL http://documenteditorjava.azurewebsites.net/tomcat-0.0.1-SNAPSHOT to the serviceUrl in the client-side DOCX Editor control. For more information about the DOCX Editor control, refer to the Getting Started page.