You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Thomas Fahrmeyer <th...@einsurance.de> on 2001/01/26 15:39:13 UTC
How can I compile and insert a external text ??
Hi,
at first I wann say that velocity seems to be a piece of cool software.
I did run into a problem: I want to compile a String and insert it into the
template at a specified position defined through a placeholder. I can't use
the parse tag.
I want do something like the following.
String text = getExternalText();
String compiledText = compile(ctx, text);
ctx.put("compiledText", compiledText);
template = getTemplate("sample.vm");
in the template I have a placeholder $compiledText. The external text can
also have variables to be expanded, thats why it must be compiled with the
given context.
any ideas ??
Thanx in advance
bye
Thomas