velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <>
Subject #parse content from a variable?
Date Sat, 18 Sep 2004 01:56:06 GMT
Hey Gang -
  Just going to throw this out there... see if anybody has a bright idea.

I'd like to dynamically tell #parse what to parse...but have the actual
template to parse come from a variable I set inside a servlet.


request.setAttribute("A.THINGY", "#set ($foo=1) $foo $bar $bleck");
request.setAttribute("thing_to_inclue", "A.THINGY");
In the template:
#parse ("$thingy_to_parse")

Output would be: 1 bar bleck

Said another way... #parse() loads a template using the resource loaders,
right? So is there a way to get it to load from a request variable?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message