Spring Boot Whitelabel Error Page almost everywhere

Viewed 23059

Facing some difficulties trying to run Spring Boot to work with JSP pages. I know the limitations provided in documentation, so made everything according to the rules. However, can't find a problem.

I'll try to provide as much information as possible.

Wanted to start using Spring Boot. I'm using:

IntelliJ IDEA, Maven, Maven Spring Boot Plugin, Embedded Tomcat. Link to the project sample.

The REST controller works fine, but when I try to link jsp to the common controller, I 100% end up with Whitelabel error page, stating 404.

Moving files from WEB-INF to resources/static doesn't help.

The problem is even when I'm trying to run the simplest quick-start Spring Boot projects, I'm facing exceptions. Here's exception log when I tried to load the example from mkyong site.

I tried to manage maven dependencies manually, as I browsed through some "potential" solutions and found that it could be jar conflict. I even tried to launch the project on a completely fresh operational system - that's the level of my despair.

Any guidance will be accepted as a divine ambrosia.

UPDATE

When trying to run the project again using mvn spring-boot after adding javax.servlet-api in dependencies got the following error. Log:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-
maven-plugin:1.4.5.RELEASE:run (default-cli) on project demo: An 
exception occurred while running. null: InvocationTargetException: 
Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerExceptio
n: Unable to start embedded Tomcat: Failed to start component 
[StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: 
Failed to start component [StandardEngine[Tomcat]]: A child container 
failed during start -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with 
the -
e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

UPDATE

Using suggestion of @Piotr Gwiazda, tried the same but with Thymeleaf instead of JSP. Worked. However, I would like to know why JSP did not.

3 Answers
Related