Displaying a model in the View, using the JSTL
This recipe shows how to populate the Spring MVC View with data and how to render this data within the View.
Getting ready
At this point, we don't have any real data to be displayed in our View. For this purpose, we have created three DTOs and two service layers that are injected from their Interface into the controller.
There are two dummy service implementations that are designed to produce a fake set of data. We will use the Java Server Tags Library (JSTL) and the JSP Expression Language (JSP EL) to render the server data in the right places in our JSP.
How to do it...
- After checking out the
v2.x.x
branch (in the previous recipe), a couple of new components are now showing-up in the cloudstreetmarket-core ...
Get Spring MVC Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.