You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Matthias Wessendorf <mw...@pironet-ndh.com> on 2005/04/11 11:50:03 UTC

Template as *Stream* ?

Hi,

I am testing Velocity and I have some templates on file.
That works fine.

However is there a possibility to use a *stream*
something like a String ?

getTemplate("Hello $name! Welcome to Velocity!");

instead of getTemplate("hello.vm");


thanks,
Matthias

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


Re: Template as *Stream* ?

Posted by Christoph Reck <ap...@recks.org>.
The same answer given by Shinobu in the thread "variables in a variable (recursive)." applies here:

Check out (View)RenderTool.  :)
     http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/generic/RenderTool.html
     http://jakarta.apache.org/velocity/tools/view/ViewRenderTool.html

Best regards,
-- Shinobu

Best regards from me too,
:) Christoph Reck


Matthias Wessendorf wrote:
> Hi,
> 
> I am testing Velocity and I have some templates on file.
> That works fine.
> 
> However is there a possibility to use a *stream*
> something like a String ?
> 
> getTemplate("Hello $name! Welcome to Velocity!");
> 
> instead of getTemplate("hello.vm");
> 
> 
> thanks,
> Matthias
> 
> ---------------------------------------------------------------------
> 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