Introduction
In this article I will explain how to deploy a web app in Azure using Eclipse. To learn about what eclipse IDE is and its usage you can refer to this link.
Prerequisites
- A jdk(java developer kit ) v1.7 or later.
- Eclipse IDE of JEE of neon or later version of it. It can be downloaded from the following link
- Azure SDK kit , it can be downloaded and installed from this following link.
- Apache tomcat (local server for eclipse).
- Azure toolkit for eclipse and you can visit this article from following link for installing in eclipse.
- A active azure subscription.
Create a web application using Eclipse
Step 1
Open Eclipse and click Menu->File->Dynamic web project.
Step 2
Provide a name for your project and click Finish.
Step 3
In the left side of eclipse project explorer view, Right-click your project and select->web content, select new and then click JSP file.
Step 4
In JSP file dialog, name the file index.JSP & click finish.
Step 5
The index.JSP file will be opened in Eclipse, in the text to display “web app_publish “within the existing <body> element tag as shown and save it.
Azure web deployment service from Eclipse
Step 6
In Project Explorer, right click project name
Step 7
Click the Azure option and then click publish as Azure web app.
Step 8
Before publishing as cloud service make sure you have installed azure SDk tool.
Step 9
you will be directed to login into your Azure account.
Step 10
After logging into azure portal a management of subscriptions window will appear and you can select the two subscriptions or you can select anyone and click close.
Step 11
In the deployment to Azure web window click new button to choose web app container, by default the web app container will be an empty box. (since I have created some web container for my previous apps, so in this article I would like to select a new web app container).
Step 12
The New Web App Container window dialog box will appear. Enter a DNS label for your Web App Container, this will be the host URL for your web app in Azure. ( the name must be available and conform to Azure web app naming).
Step 13
For specifying JDK for web app, click the JDK tab, and select Deploy a 3rd party JDK available on Azure (This option will allow you to choose from the list of JDKs which are provided by Azure). We can select default option but the distribution of Java 8 version will be deployed by Azure automatically to your web app container as your JVM. We can specify a different version & distribution of the JVM for Web App. The default option will deploy a recent distribution of Java 8, and click OK.
Step 14
We can see a message of creation and deployment of application to web app container.
Step 16
If you want to stop the running process click Azure explorer as shown in the screen and double click the web apps. Right click the web app. click Stop.
I hope this article will be useful.
Thank you.