Spring boot: Path with “WEB-INF” or “META-INF”

Warning Path with “WEB-INF” or “META-INF”

Today I faced an issue while developing a spring boot demo app. I Have created a spring boot project, added UserController, and updated the application.properties file with the following configuration.


The complete project structure looks like below.


These configurations are used to tell spring where to look for JSP files. We can configure it in our Springboot application class as well as below.

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.JstlView;

public class DemoappApplication implements WebMvcConfigurer{

	public static void main(String[] args) {
		SpringApplication.run(DemoappApplication.class, args);

    public void configureViewResolvers(ViewResolverRegistry registry) {
        InternalResourceViewResolver resolver = new InternalResourceViewResolver();


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

public class UserController {

	public String dispalyAddUser(Model model) {

		return "add-user";


<%@ page language="java" contentType="text/html; charset=UTF-8"
<!DOCTYPE html>
<meta charset="UTF-8">
<title>add user</title>

After creating all the required files, I started the application and access the URL http://localhost:8080/user/add. I was expecting an empty HTML page with the title “add user” based on the configuration, but in response displayed an error page.

Path with WEB-INF or META-INF

Therefore I checked the console log and found the warning “WARN 3676 — [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler : Path with “WEB-INF” or “META-INF”: [WEB-INF/view/add-user.jsp]”.

Root Cause

The class requires to resolve the JSP path is available in the tomcat jasper package and the dependency is not added in pom.xml. Hence, the spring boot application is not able to resolve the JSP path.


The dependent classes are available in tomcat jasper. Add tomcat jasper dependency in the pom.xml file.


You can copy this from the maven repository as well.

Once you add the above dependency in the pom.xml file and re-run the application it will work as expected.

Recommended Read

Java Exception in detail with example
Java Exception Test

Happy Learning !!

1 thought on “Spring boot: Path with “WEB-INF” or “META-INF””

Leave a Comment