Book Image

Spring MVC Beginner's Guide

By : Amuthan Ganeshan
Book Image

Spring MVC Beginner's Guide

By: Amuthan Ganeshan

Overview of this book

Table of Contents (19 chapters)
Spring MVC Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – implementing a master detail view


A master detail view is nothing but the display of very important information on a master page. Once we select an item in the master view, a detailed page of the selected item will be shown in the detail view page. Let's build a master detail view for our product listing page so that when we click on any product, we see the detailed view of that product.

We have already implemented the product listing page (http://localhost:8080/webshop/products) and product details page (http://localhost:8080/webstore/products/product?id=P1234), so the only thing needed is to connect these two views to make a master detail view. Perform the following steps:

  1. Open products.jsp; you can find products.jsp under src/main/webapp/WEB-INF/views/ in your project and add the following spring tag lib reference on top of the file:

    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
  2. Add the following lines after the Available units in stock paragraph...