Is there any way to run a war file on localhost without having the need to have tomcat installed on the machine? I have built a web application using gradle, spring and tomcat and I would like to be able to send the project as a war file to someone else and have them run it, even if they don't have tomcat installed.
Asked
Active
Viewed 398 times
0
-
https://spring.io/projects/spring-boot – Hemant May 11 '20 at 09:27
1 Answers
-1
Make it a runnable jar which contains tomcat inside. And then start the application with:
java -jar myWebApplication.jar

Twistleton
- 2,735
- 5
- 26
- 37
-
I was using the gradle tomcat pluging by bmuschko. Would this still work? – sahil chabria May 11 '20 at 08:31
-
With Spring Boot this would be one parameter. Unfortunately I don't know the plugin by bmuschko. – Twistleton May 11 '20 at 08:35