We have a built a spring boot application which invokes a command-line eclipse tool and generates few output files. Configurations for eclipse tool is added in the application.properties file. This is successfully achieved locally. Now, we have deployed the spring-boot application to azure cloud and able to access the REST apis. But stuck while invoking the eclipse command-line tool. How to upload the commandline tool into azure and access it through the cloud app?
I have created a spring boot restful web services application and exported it to the WAR file. Created VM instance in GCP. Installed Java, tomcat, and MySQL. Created DB in MySql Server. Deployed the war file in /var/lib/tomcat8/webapps. The application seems working as tables are created in MySQL DB. I can access tomcat using ip:8080 but I cannot run my application. When I run an API from postman it says 403 forbidden (the same works from if run in spring boot). Am I missing any configuration? It will be greatly helpful if provided a solution.
This question already has an answer here:
Deploying WAR FILE in Microsoft Azure Web App
(1 answer)
Closed 5 years ago.
I am attempting to upload a War file of a web service to Azure, running tomcat 8.
I have the war file in the relevant webapps folder on onedrive, however the deployment consistently fails, and frustratingly it does so without an error message.
I'm pretty sure that if I can't use a method involving uploading the binary file to Azure, I cannot use Azure. When using repositories like github, the build would fail due to reference issues, so I believe that is not an option.
Unfortunately I must use Azure, I'm aware that with other services like AWS I'd be done in 5 minutes as you can directly upload without any Microsoft (tm) hassle.
Normally, there are 4 ways to deploy a war file on Azure Web Apps: FTP, repository like Github/BitBucket or OneDrive/Dropbox, Kudu Tool, Azure Toolkit for Eclipse/IntelliJ.
First of all, you need to know File structure on azure. The Java war file must be deployed at the directory webapps under the wwwroot path of Azure Web Apps. You can access the Kudu tool url https://<your-webapp-name>.scm.azurewebsites.net/DebugConsole to lookup it.
Using FTP for deployment, you can refer to the Kudu wiki page Accessing files via ftp to know it, and set the FTP user & password via Azure portal as below.
Using repository like GitHub, you can refer to the Kudu wiki page Deploying from GitHub to know it. Please first make sure the file structure on GitHub repository as the same as its under your wwwroot directory, as below.
A convenient and fast way is using Kudu tool to drag & drop your war file into the webapps directory, as below.
If you had installed Azure Toolkit for Eclipse/IntelliJ, you can refer to Deploy Java Web Apps to Azure using Eclipse or IntelliJ: Deploy Java Web Apps to Azure to do it.
Hope it helps. Any concern, please feel free to let me know.
Quick note that gave me a lot of frustration to figure out. If you use ftp via a client (I use FileZilla for it), think about this:
Place the .war file under: site > wwwroot > webapps > [Place .war file here].
Do also change the .war file name to: ROOT.war
It has to be that name for the system to deploy it. At least for me, the GitHub integration is not working, so I use this ftp method.
The deployment via ftp can take several minutes to be deployed and running.
I am trying to deploy my java web application to Azure using FTP. Is the .war file enough to be uploaded? Or all the project files have to be uploaded?
I believe that .war file is enough, because in that file you have everything that your java web application need, like the java classes, servlets, static web pages, etc, as you can see in this example, opening the war file:
war file
In fact, when we use, for example, the Tomcat server, that's the only thing that the server use for running the web application.
I hope I have helped you!
i am newbie to java/eclipse and also to creating web services.Now i am trying to host the web service which is created in java using eclipse.
http://www.softwareagility.gr/index.php?q=node/29
i am following the above link for my reference.
My problem is,i got struggle on after creating a web service.I have created a web service and run it through the tomcat server and its showing like the below image
this is the link of wsdl of my web service i got
"http://localhost:8080/ResourceA/services/Myservice?wsdl"
Now i need to know,what steps i want to do after these steps, to publish and run my web service through my cloud server?
Thanks in advance!..
Export the project as a Web Archive (.war file) and deploy that on the server.