sim085
Apr 27th, 2006, 06:14 AM
Hi,
I have a problem understanding how to integrate tiles with spring. At the moment I am generating a simple page at a time, and I am using FreeMarker. In my app-servlet.xml I configured FreeMarker as follows:
<bean name="viewResolver"
class="org.springframework.web.servlet.view.freemarker.Fr eeMarkerViewResolver">
<property name="suffix">
<value>.ftl</value>
</property>
<property name="exposeRequestAttributes">
<value>true</value>
</property>
<property name="exposeSessionAttributes">
<value>true</value>
</property>
</bean>
This worked fine and all my pages are being executed properly. However I now decided to start using tiles. I created my tiles-def.xml with no problem. However I found a problem when I cam to configure tiles in my app-servlet.xml file. In the book I am reading it asks me to place the following xml lines:
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResou rceViewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles.TilesVi ew
</value>
</property>
</bean>
But as you can see this is also a View Resolver! So how can I use tiles while keeping FreeMarker working?
Sorry but in this book it says how I can have more then one mapping handler, but could not find reference on how to have more then one view resolver!
Thanks and regards,
Sim085
I have a problem understanding how to integrate tiles with spring. At the moment I am generating a simple page at a time, and I am using FreeMarker. In my app-servlet.xml I configured FreeMarker as follows:
<bean name="viewResolver"
class="org.springframework.web.servlet.view.freemarker.Fr eeMarkerViewResolver">
<property name="suffix">
<value>.ftl</value>
</property>
<property name="exposeRequestAttributes">
<value>true</value>
</property>
<property name="exposeSessionAttributes">
<value>true</value>
</property>
</bean>
This worked fine and all my pages are being executed properly. However I now decided to start using tiles. I created my tiles-def.xml with no problem. However I found a problem when I cam to configure tiles in my app-servlet.xml file. In the book I am reading it asks me to place the following xml lines:
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResou rceViewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles.TilesVi ew
</value>
</property>
</bean>
But as you can see this is also a View Resolver! So how can I use tiles while keeping FreeMarker working?
Sorry but in this book it says how I can have more then one mapping handler, but could not find reference on how to have more then one view resolver!
Thanks and regards,
Sim085