How to add a JSP page into Spring boot web application

I generate a sprint boot by Then I added a JSP view to the project. But it is not rendering. I don't know what could be wrong. Here is my project code:-

Main App:-


public class Application {

public static void main(String[] args) {

ApplicationContext ctx =, args);






public class MvcConfiguration implements WebMvcConfigurer {


public ViewResolver getViewResolver() {

InternalResourceViewResolver resolver = new InternalResourceViewResolver();



return resolver;



public void configureDefaultServletHandling(

DefaultServletHandlerConfigurer configurer) {






public class HelloController3 {


public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) {

model.addAttribute("name", name);

return "hello";



I have my hello.jsp file located at /WEB-INF/ directory. What am I missing? It...

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts