Step 1: Preparation for the files to be download from Azure Storage:

Java Run Time: 

- Download Java Run Time from Java web site and the zip the runtime from the installed location.  

- The JRE zip file should have a root folder as "jre7"

Tomcat Installation Package:

- Please download desired Tomcat installation zip file from

- Please unzip the ZIP file to a location in your machine and edit \conf\server.xml as below:

       <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" />

Your Tomcat application project

- In most of the cases your Tomcat application will be inside "webapp"s folder in a folder itself. Please package your whole application into a ZIP file.

The above 3 zip files should have the root folder as below:


Step 2: Uploading all the files to Windows Azure Storage

Once you upload all 3 files (or more) to Windows Azure Storage your Windows Azure Storage container will look like as below:


Step 3: Opening Windows Azure Tomcat Solution in VS2010.

After you open Windows Azure Solution in Visual Studio 2010, the solution will look like as below:


Edit startup\startup.bat to have correct Windows Azure Storage credentials:


@REM Setting up Azure Stroage Credentials
set azurestoragename=*********azure_storage_name****************
set azurestoragekey=**********azure_storage_key*****************
set storagecontainername=*****azure_storage_container_name******

@REM Download Tomcat ZIP
startup\packagedownloader.exe "%azurestoragename%" "%azurestoragekey%" "%storagecontainername%" "%filename%"

@REM Download JRE Runtime ZIP
startup\packagedownloader.exe "%azurestoragename%" "%azurestoragekey%" "%storagecontainername%" "%filename%"

@REM Download Tomcat/Java Applicaiton ZIP
startup\packagedownloader.exe "%azurestoragename%" "%azurestoragekey%" "%storagecontainername%" "%filename%"

@REM unzip Tomcat
cscript //B //Nologo startup\unzip.vbs "%ROLEROOT%\approot"

@REM unzip JRE
cscript //B //Nologo startup\unzip.vbs "%ROLEROOT%\approot\apache-tomcat-7.0.19"

@REM unzip project files to tomcatServer\webapps folder
md "%ROLEROOT%\approot\apache-tomcat-7.0.19\webapps"
cscript //B //Nologo startup\unzip.vbs "%ROLEROOT%\approot\apache-tomcat-7.0.19\webapps"

set JRE_HOME=%ROLEROOT%\approot\apache-tomcat-7.0.19\jre7
set CATALINA_HOME=%ROLEROOT%\approot\apache-tomcat-7.0.19

@REM Edit Server.xml
@REM cd "%ROLEROOT%\approot\apache-tomcat-7.0.19\conf"
@REM copy server.xml server.orig.xml
@REM cscript //nologo startup\editserverxml.vbs server.xml 80

@REM start the server
cd "%ROLEROOT%\approot\apache-tomcat-7.0.19\bin"
copy startup.bat startup.back
set > %RoleRoot%\approot\env.txt
startup.bat > %RoleRoot%\approot\tomcat.txt
exit /b 0


The provided solution already have port 80 based TCP endpoint defined. IF you would need to add HTTPS endpont please look the "Adding SSL to Tomcat Solution" documentation section. 


Step 4: Adding RDP access to application and packaging for deployment

It is good to add RDP access to your application when you are ready to publish the application, add RDP access as well. If you dont know how to do, please follow link below:

Now just deploy your application to Windows Azure. 


Step 5:  Verifying that Zip files are downloaded from Windows Azure Blob storage

After your VM will start and download your zip file the download completion log will be available on Azure Storage as below


Step 6: Running Tomcat Application

After some time your worker role will be ready as below:

Last edited Aug 17, 2011 at 1:44 AM by Avkash, version 6


No comments yet.