You are here
Home >

Whitelabel Error Page Spring Boot

Problem:

Whitelabel Error Page on Browser page. There was an unexpected error (type=Not Found, status=404). Whitelabel Error Page : Spring Boot can be resolved as per the instructions given in solution below.

Warning On console:

[nio-8080-exec-3]_[0;39m _[36mo.s.w.s.r.ResourceHttpRequestHandler    _[0;39m _[2m:_[0;39m Path with “WEB-INF” or “META-INF”: [WEB-INF/pages/loginPage.jsp]

Whitelabel Error Page : Spring Boot

Cause Of  Issue:

One of the reasons of getting the most common ‘Whitelabel Error Page’ in Spring Boot is that you may not have added web server related dependency.

Solution :

If you are running your application on Tomcat (Spring Boot selects Tomcat by default), Ensure that you have jasper jar in the list of dependencies :

<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>

If you are using a Jetty server, add below dependency:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

Similarly If you are using Undertow server, add below dependency:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>

You can find maven dependencies from the maven repository.

Additionally, you can have jstl jar as well if you are using JSP as a view Page to use JSTL tags and don’t want to see blank page again or any error because of this.

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>

You may want to visit More on Spring boot.

Generally, in order to identify and resolve the issue, it’s essential to check your application’s logs (usually found in the logs directory of your Spring Boot project) for specific error messages and stack traces. This information will help identify the root cause of the error, and you can then take appropriate action to fix it, such as implementing error handling, correcting configuration settings, or addressing code issues.

—-End of Whitelabel Error Page Spring Boot—

5 thoughts on “Whitelabel Error Page Spring Boot

  1. Have you ever thought about publishing an ebook or guest authoring on other blogs? I have a blog based upon on the same ideas you discuss and would love to have you share some stories/information. I know my audience would appreciate your work. If you are even remotely interested, feel free to shoot me an email.

  2. Do you mind if I quote a few of your posts as long as
    I provide credit and sources back to your blog?

    My blog is in the exact same area of interest as yours and
    my visitors would genuinely benefit from some of the information you present here.
    Please let me know if this ok with you. Many thanks!

Leave a Reply


Top