Spring Boot Masterclass – Display the list of expense in JSP 08

Hello, in this post we will display the list of expenses in the JSP view template. Let’s begin. First, we need to add the dependency for the JSTL tag library in pom.xml

pom.xml




Next, add a list of expenses to the model and view object in order to access it in JSP view template

MasterController.java

Next, add a reference to the JSTL tag library inside the view template and loop through the list of expenses using the JSTL forEach tag.

home.jsp

That’s it for this post. This ends the feature 1 for Expense Tracker. I will see you in the next feature. Let me know in the comment section if you have any queries anything on this.




 

Thanks
Bushan SC

Leave a Reply

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