0

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.

Aniket Sahrawat
  • 11,710
  • 3
  • 36
  • 63

1 Answers1

-1

Make it a runnable jar which contains tomcat inside. And then start the application with:

java -jar myWebApplication.jar 

https://www.baeldung.com/deployable-fat-jar-spring-boot

Twistleton
  • 2,509
  • 5
  • 23
  • 35