Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Velocity with Tiles and Spring

I'm presently using Spring 3.0.4 and Apache Tiles 2.2.2 in my web app. I'd like to replace JSP with Apache Velocity 1.6.3 but I'm somewhat confused on how to do this. Ultimately, I'd like to be able to do the following in a Tiles definition:

<definition name="basicLayout" template="/WEB-INF/layout/basicLayout.vm">
    <put-attribute name="header" value="/WEB-INF/layout/header.vm" />
    <put-attribute name="content-area" value="/WEB-INF/layout/content.vm" />
    <put-attribute name="footer" value="/WEB-INF/layout/footer.vm" />
</definition>

Is this possible? If so, do I need to create any custom view classes to support it? I'm currently using the standard Spring VelocityConfigurer, TilesConfigurer, VelocityView, TilesView classes.

Thanks!

like image 360
Andre Avatar asked Nov 05 '22 06:11

Andre


1 Answers

I've created helper classes which include tiles integration with velocity: https://github.com/pete911/openhouse-web there's a descritption when you scroll down. classes can be found in maven central as well.

like image 163
pete911 Avatar answered Nov 09 '22 02:11

pete911



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!