velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhaval.h.ud...@orbitech.co.in
Subject #parse() directive
Date Wed, 16 Apr 2003 06:24:45 GMT
Hi,

I have some doubts about the #parse() directive. I believe that apart
from a filename even a Velocity variable can be given here. However it
seems that the variable must refer to a template file which can be found
via the ResourceManager mechanism. However in my case, the variable
actally refers to a string containing VTL. I need this VTL to be parsed
sign the context I supplied. i.e. instead of using the ResourceManager
to lcoate a template file, I am giving the contents of the template
which need to be parsed. 

At present whenever I have something like

#parse ( $templateString )

wherein templateString is stored into the context with value like

int i=0;
$showHelp
int j=0;

I get a ResourceNotFound exception with message as the above code. 

Can anyone guide me about using the #parse() to fulfill my objective.

Thanx in advance for the help.

Regards,
Dhaval Udani



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message