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 – creating views for every view state


Enough of introduction; let's dive into Apache Tiles by defining a common layout for our web application and let the pages extend the layout:

  1. Open pom.xml; you will find pom.xml under the project root directory.

  2. You will be able to see some bottom tabs under pom.xml; select the Dependencies tab and click on the Add button of the Dependencies section.

  3. A Select Dependency window will appear; enter Group Id as org.apache.tiles, Artifact Id as tiles-extras, and Version as 3.0.3. Then, select Scope as compile, click on the OK button, and save pom.xml.

  4. Similarly, add one more dependency with Group Id as org.slf4j, Artifact Id as slf4j-api, and Version as 1.7.5. Then, select Scope as compile, click on the OK button, and save pom.xml.

  5. Now create a directory structure, tiles/definitions/, under the directory src/main/webapp/WEB-INF/; then, create an XML file called tile-definition.xml, add the following content into it, and save it. In the following...