File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes Grails and Velocity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Grails and Velocity" Watch "Grails and Velocity" New topic
Author

Grails and Velocity

Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Is it possible to use Velocity with Grails?

Can you suggest any good resources for this?


Mourougan
Open Source leads to Open Mind
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Grails uses GSPs which are really just JSPs but with a few more features because of being able to write groovy code in EL. Since JSP 2.0, libraries like Velocity don't really gain you anything. Why would you want to use Velocity with Grails?


GenRocket - Experts at Building Test Data
Jon Dickinson
Author
Ranch Hand

Joined: Feb 24, 2009
Posts: 45
Hi Mourougan,

There is no support, that I am aware of, for Velocity in Grails.

The only benefit I can think of for using a separate templating language for the view, e.g. Velocity or Freemarker, is that you can test the views without running the entire application. However, if I wanted to unit test the views I would rather use Java or Groovy code than a template language.

After a quick Google I think it is more likely that freemarker will be supported before velocity, if either of them are on the plan.

Cheers,
Jon.


Jon Dickinson
Accolade Consulting
Grails 1.1 Web Application Development
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Thanks for the info Jon.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Grails and Velocity