SpringSource Spring Framework tutorials and examples. Focusing on Spring 3 and above.
Following on from my previous tip, I will now define the page view from our previous tip. Using Tiles properly, the home page is composed of several distinct pieces. The main_template.jsp file describes the common layout for all pages in the Springexample application, while home.jsp displays the main content for the home page. Plus, carForm.jsp and login.jsp provide additional common elements.
The home.jsp is where the home page request finishes its journey. It picks up the list of Cars
In earlier tips, I talked about using Spring MVC and the use of different view technologies. In this tip, I will look at Tiles as a view technology for Spring MVC. Tiles was initially built to be used with the Struts Framework. But as it is a powerful view technology it has been reused by other web frameworks. To use Tiles with Spring MVC you need to register the Tiles’ view resolver as a bean with the application’s xml file, springexamples.xml. Java Code: <bean class= "org.springframework.web.servlet.view.tiles2.TilesViewResolver"/>
<bean class= "org.springframework.web.servlet.view.tiles2.TilesViewResolver"/>