velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: 'Compiling' Velocity pages
Date Thu, 19 Jul 2001 03:10:44 GMT
Tal Dayan wrote:
> 
> Since there was no other answer, let me try to answer it though I
> am definitely not a Velocity expert.
> 
> You can always instantiate a template with some 'typical' context and
> execute it. If there was no exception, you may consider it as a 'go'. Then
> you can iterate all the templates in your collection and test them
> one by one.
> 

Good answer - however, if all you want to do is verify the syntax, then
you don't even need to worry abou the context - just do a getTemplate()
on every template you care about, and it will be parsed...

geir

> The trick is to be able to construct a typical context for each of the
> template in your collection.
> 
> Does this make sense ?
> 
> Tal
> 
> > -----Original Message-----
> > From: One Way [mailto:oneway_111@yahoo.com]
> > Sent: Sunday, July 15, 2001 12:23 AM
> > To: velocity-user@jakarta.apache.org
> > Subject: 'Compiling' Velocity pages
> >
> >
> > Is there a way to 'compile' a Velocity page (for the purpose of
> > verifying it for errors) without loading the page in to the browser?
> >
> > Thanks in advance
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Mime
View raw message