Spring Boot Masterclass – Configure the JSP view template 03

In this post, we will configure the JSP view template in the Spring boot application. let’s begin. First, we need to add a dependency in pom.xml in order to use the JSP as a view template in Spring boot application.

pom.xml




Next, configure prefix and suffix in the properties file

application.properties

Next, create a file home.jsp inside the src/main/webapp/WEB-INF/views/ folder

home.jsp

Next, create a controller and handler method to serve the home page. Inside the src/main/java/in/bushansirgur/expenseyoutube/ create a package with name controller

MasterController.java

That’s it for this post. Let me know in the comment section if you have any queries.

Thanks
Bushan SC

2 thoughts on “Spring Boot Masterclass – Configure the JSP view template 03”

  1. In My System Not Show the Home Page in Browser
    It Shows
    Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.

    Fri Jul 24 20:03:36 IST 2020
    There was an unexpected error (type=Not Found, status=404).
    No message available
    This application has no explicit mapping for /error, so you are seeing this as a fallback.

    Fri Jul 24 20:03:36 IST 2020
    There was an unexpected error (type=Not Found, status=404).
    No message available

    1. Hello Aravind, if you don’t configure JSP properly in your application then you will face this Whitelabel error.So make sure to check the configuration inside the application properties file.

Leave a Reply

Your email address will not be published. Required fields are marked *