Spring and Tiles – presentation tier in http://www.123urban.ro

1 min read >

Spring and Tiles – presentation tier in http://www.123urban.ro

Engineering Insights & Enterprise solutions

Presentation tier in 123urban – Spring comes to the rescue as usual with its embedded support for Tiles. Basically, the only setting is to change your viewResolver in your -servlet.xml from JstlView to TilesView.

 <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">        
	<property name="requestContextAttribute" value="requestContext"/>        
	<property name="viewClass" value="org.springframework.web.servlet.view.tiles.TilesJstlView"/>    

Notice the use of TilesJstlView a specialization of TilesView which offers support for JSTL pages.

From here on is just as easy as a walk in the park – classic Tiles -> tiles.xml stays in WEB-INF and works like a charm. You should be aware that from now on all your responses will go through Tiles which means all your Spring MVC controllers will have to define their views as being Tiles layouts.

Get in touch

We are always happy to talk






165 Splaiul Unirii, Timpuri Noi Square,
TN Office 2 building, 4th floor,
District 3, Bucharest, Romania, 030134