velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: Multiple .VMs
Date Mon, 03 Jan 2005 17:57:30 GMT
i'm not quite sure what you mean by "processed over and over".  do you
mean parsed from file over and over?  or do you mean "merged with
variable data" over and over?

either way, the answer is yes, but the latter is the typical use case
and thus quite speedy.     basically, a template is parsed from a file
and cached in parsed form.  it is then repeatedly merged with
dynamically variable data for each call to the mergeTemplate() method.
 typically, these calls are made per servlet request, but i see no
reason it couldn't be adapted for pushlets.

while there are those who use Velocity rather statically to generate
files and then merely serve/use the generated files rather than do
things on the fly (Anakia and Texen are typically used thus), Velocity
is capable of much more.

On Sun, 2 Jan 2005 22:42:12 -0600, William Fuller
<williamfuller@sbcglobal.net> wrote:
> I mentioned in an earlier post that I was attempting to convert pushlets to
> use Velocity.  I did some experimenting and I have a hybrid Velocity/JSP
> version running.  Needless to say I want to NIX the JSP.
> 
> I need to load a page with several hidden frames, each hidden frame wanting
> to point at a different .VM.  I want the same servlet that generated the
> page with the hidden frames to serve the templates.  The catch is, to do the
> "pushlet" thing, the template will need to be processed over and over again.
> 
> class extends velocity servlet...
> for( int i = 0; i < 10; i++ )
>   // database type stuff...
>   get.template()  sort of thing
> 
> Is this something that Velocity can handle?
> 
> I would appreciate any advice on this topic before finding out the HARD way.
> (-;
> 
> Thank you in advance.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message