1

I am new to spring Boot and I know that this question has been asked before here, but none of the answers could be of any help to me. I googled and found this link but this too didn't work (I don't want to set it by mapping root context in controller). So I am asking here once again, How to map the welcome page or default page(index.jsp) to the root context in Spring Boot application?

This is my project structure and I am using Spring Boot 2.0.3

enter image description here

Even when I explicitly provide the complete path, it remains unfound as shown below. Please help me understand what am I missing here. enter image description here

Rahul Gupta
  • 1,079
  • 2
  • 15
  • 27
  • The correct solutions don't work because you are using JSPs (whereas those use Thymeleaf or a static `index.html`) and second those JSPs are in the wrong location. I would however strongly reconsider the use of JSP with Spring Boot as those are quite restrictive when using embedded containers. – M. Deinum Jul 30 '18 at 10:45
  • @M.Deinum Thanks for the suggestion but what would be the way to go ahead if I want to continue with JSPs. – Rahul Gupta Jul 30 '18 at 10:58
  • 1
    Follow the regular war creation and place the JSPs in the proper location (and configure the view resolver as such) . But as stated you should really consider other options as those are much more flexible in an embedded world. – M. Deinum Jul 30 '18 at 11:00

0 Answers0