Best practice to run a webapp on Tomcat inside of IntelliJ
已回答
Googling I found two ways to "run" a WAR on Tomcat from inside IntelliJ.
- Create a Run Configuration that explicitly points to Tomcat.
- Get the SmartTomcat plugin and create a SmartTomcat configuration.
Also, during one of my exxperiments I build webHello.war but when I launched it deployed with a URL pointing to localhost/webHello_war or localhost/webHello_exploded_war instead of the localhost/webHello I was expecting.
1) Which of the two Run configuration approaches is the "best practice"?
2) What can I do to force the URL to be the more common localhost/webHello in the example above?
请先登录再写评论。
1. The bundled Tomcat Run configuration.
2. Change the context in the deployment settings:
Thank you, that worked perfectly!