title: Create war file from Spring:boot project in Eclipse
body: <p>I am pretty new to Spring Boot and I have completed a application that works well on my localhost. As I have been told to deploy it outside my localhost on for example a webbhotel or simular I need to export the project as a war-file and not as a jar-file. </p>
  
  <p>UPDATE!!
  I run the project as a Springproject generated in Spring Initialzr and using Eclipse as a IDE.</p>
  
  <p>In Eclipse I have followed the steps </p>
  
  <pre><code>&lt;packaging&gt;war&lt;/packaging&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;!-- … --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- … --&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>from Spring Boot Referencepage 
  <a href="https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file" rel="noreferrer">https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file</a></p>
  
  <p>In my project I use</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Do I need to add the sprinng-boot-starter-tomcat dependency and add provided to that on aswell as tomcat-embed-jasper so that my dependency will be like this?</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
       &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>When I try to export to war-file in Eclipse, Eclipse can't find my project. It can find it if I try to export Java>JAR FILE but not if I try Web>WAR FILE</p>
  
  <p>Do anyone know what I am doing wrong and if it is neccesary to export to a WAR-file to deploy to a external server?</p>