View RSS Feed

Recent Blogs Posts

  1. Defining the Page View with Tiles View Resolvers in Spring MVC

    by , 11-27-2011 at 10:41 PM
    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 ...
  2. Using Tiles in Spring MVC

    by , 11-27-2011 at 10:39 PM
    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"/>
    ...
    Tags: spring mvc, tiles Add / Edit Tags
    Categories
    MVC , Tiles , Spring 3