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 using Java, PHP or .NET. More here ...
  •    » mobile applications for iPhone, Android or J2ME. More here ...

For an enquiry, send an email to contact [at] tremend [dot] ro.

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

November 1st, 2006 by Marius Hanganu in Java, General, Spring

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.

read more ...