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

About the author

Bushan Sirgur

Well, I am Bushan Sirgur from Banglore, India. Currently, I am working as a Software Developer in a Service Base Company. I am interested in JAVA/J2EE, Angular 2, JavaScript, jQuery, MongoDB.

View all posts

3 Comments

  • 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

    • 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.

  • I am getting the same error

    Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.

    Thu Sep 10 15:09:19 IST 2020
    There was an unexpected error (type=Not Found, status=404).
    No message available

Leave a Reply

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