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
  • 12,410
  • 3
  • 41
  • 67

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,735
  • 5
  • 26
  • 37