title: Why aren't my jsp files displaying when deployed by Tomcat in war file?
body: <p>ANOTHER EDIT: I just re-read it and the question is very ambiguous: the problem is Tomcat won't show me the views. They ARE in a folder under Tomcat's webapps directory.</p>
  
  <p>EDIT: BOUNTY available. The code is <a href="https://gitlab.com/edmundday/swa-boot" rel="nofollow noreferrer">here</a> </p>
  
  <p>I have a spring boot web app that runs fine under eclipse tomcat server when I navigate to <a href="http://localhost:8080/swa-boot/" rel="nofollow noreferrer">http://localhost:8080/swa-boot/</a>.
   When I try to deploy it as a war under Tomcat 9.0.14 externally I get:</p>
  
  <blockquote>
    <p>Message /swa-boot/WEB-INF/views/home.jsp</p>
    
    <p>Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p>
  </blockquote>
  
  <p><code>home.jsp</code> is in the <code>views</code> folder.</p>
  
  <p>I have tried adding to pom the resource:</p>
  
  <pre><code>        &lt;directory&gt;${basedir}/src/main/webapp&lt;/directory&gt;
          &lt;includes&gt;
              &lt;include&gt;**/**&lt;/include&gt;
          &lt;/includes&gt;
  </code></pre>
  
  <p>And the dependency</p>
  
  <pre><code>    &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;
  </code></pre>
  
  <p>I have also tried removing the ‘provided’ scope.</p>
  
  <p>I have in application.properties:</p>
  
  <pre><code>spring.mvc.view.prefix=/WEB-INF/views/ 
  spring.mvc.view.suffix=.jsp
  </code></pre>
  
  <p>I have changed any <code>&lt;a</code> tags in the jsp pages to be of the form:
  <code>&lt;a href=" &lt;spring:url value="/mappedpath" /&gt; "&gt;TakeMeToTheController&lt;/a&gt;</code>.</p>
  
  <p>I have added the views folder to the Deployment Assembly.</p>
  
  <p>The folders under tomcat web apps look like:
  <a href="https://i.stack.imgur.com/MYFzU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MYFzU.png" alt="enter image description here"></a></p>
  
  <p>And under the tomcat server web apps directory:
  <a href="https://i.stack.imgur.com/jEPov.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jEPov.png" alt="enter image description here"></a></p>
  
  <p>Any ideas?</p>
  
  <p>EDIT: Deployment Assemblies:
  <a href="https://i.stack.imgur.com/lGr4a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGr4a.png" alt="enter image description here"></a></p>