title: Is embedded Tomcat a good choice for deployment to production
body: <p>Conventionally, a Servlet Maven project is deployed to Tomcat production server by deploying a generated war to the - webapps - directory of Tomcat. However, Spring-Boot, as a practical trend, recommends <code>jar</code> over <code>war</code>. This preference  has no problem for testing, but in case of deployment to an existing Tomcat server in Production, AFAIK, only a war is accepted. So my solution would be:</p>
  <ol>
  <li>Generate a corresponding war by modifying the Maven's pom.xml, i.e. set the value of <code>packaging</code> element as <code>war</code> as such: <code>&lt;packaging&gt;war&lt;/packaging&gt;</code>. But this is manifestly an extra step</li>
  <li>Deploy the project in Production as a running Java program with the embedded Tomcat, meaning there is no normal Tomcat Server at all in production. But is the embedded Tomcat as stable in production as the normal Tomcat server?</li>
  <li>In case of deploying a Spring MVC project (no Spring Boot!) to an existing Tomcat server, I tried to use <b>Tomcat Maven plugin</b> in the <b>testing</b> phase instead of using Eclipse with Tomcat server configuration as the Tomcat server should be installed locally as a prerequisite.</li>
  </ol>
  <p>Question: Are the solutions above OK? or are there any other better solutions of deployment to production? In case of the third solution, there is only Tomcat7 Maven plugin according to my knowledge, what if I only want to test with Tomcat 8 or Tomcat 9? I tried to use a main class to start up an embedded Tomcat, but it is superb difficult to deal with the dependencies.</p>