I developed a spring boot application and deployed on external tomcat. What I am facing is when I call application through context path tomcat throws an exception.
Controller
@GetMapping(value="/", produces = "text/html;charset=UTF-8")
public String loadIndexPage() {
return "index";
}
pom.xml
<build>
<finalName>apluscontent</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
I expect application runs on http://localhost:8080/apluscontent/ but it throws below exception
Forwarding to error page from request [/index.html] due to exception [Failed to find lookupPath '/index.html' within requestUri '/apluscontent/'. Does the path have invalid encoded characters for characterEncoding 'UTF-8'?]
java.lang.IllegalStateException: Failed to find lookupPath '/index.html' within requestUri '/apluscontent/'. Does the path have invalid encoded characters for characterEncoding 'UTF-8'?