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.
EDIT: BOUNTY available. The code is here
I have a spring boot web app that runs fine under eclipse tomcat server when I navigate to http://localhost:8080/swa-boot/. When I try to deploy it as a war under Tomcat 9.0.14 externally I get:
Message /swa-boot/WEB-INF/views/home.jsp
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
home.jsp
is in the views
folder.
I have tried adding to pom the resource:
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>**/**</include>
</includes>
And the dependency
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
I have also tried removing the ‘provided’ scope.
I have in application.properties:
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
I have changed any <a
tags in the jsp pages to be of the form:
<a href=" <spring:url value="/mappedpath" /> ">TakeMeToTheController</a>
.
I have added the views folder to the Deployment Assembly.
The folders under tomcat web apps look like:
And under the tomcat server web apps directory:
Any ideas?