Tremend Tech Blog

"Software is a great combination between artistry and engineering. When you finally get done and get to appreciate what you have done it is like a part of yourself that you've put together." (Bill Gates)

Looking for software experts?

Need an expert advice on software development? Need consulting work done in time and at high standards? Tremend has the right solution for you.

We can provide expertise in:
  • high traffic and complex content website infrastructures
  • website development-advanced web programming with PHP, .NET, Java, Flash/Flex, Ajax

Our friends

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

November 1st, 2006 by Marius Hanganu

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”/>

</bean>


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.

Share/Save

Posted in Java, General, Spring | No Comments »