Tristan's Blog


My first open source contribution
January 6, 2011, 5:23 am
Filed under: Java, Programming, Scala, Spring

I’ve intended to contribute to an open source project for a quite a while, but had never made the effort to find a project to work on. Recently at work we’ve started using the Scalate templating engine with Spring MVC. Up until my change, the Spring MVC support in Scalate was very rudimentary, however the ScalateViewResolver now supports the order, prefix and suffix properties similarly to the InternalResourceViewResolver.


The updated ScalateViewResolver will be available starting with Scalate 1.4.0 and will be documented here.

A sample Spring configuration that supports both Scalate (jade) and JSP views looks like this:

With this configuration you can now return the view name and view resolver chaining will take care of rendering the correct template. The ScalateViewResolver will be called first and if it can’t find the appropriate jade template, the InternalResourceViewResolver will attempt to render the appropriate JSP template.


Leave a Comment so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>