Best practice to run a webapp on Tomcat inside of IntelliJ

Answered

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?

0
2 comments

1. The bundled Tomcat Run configuration.

2. Change the context in the deployment settings:

0

Thank you, that worked perfectly!

0

Please sign in to leave a comment.