I'd like to execute a script from a raw string (perhaps it comes from a database). How can I do this? It seems all the runScript methods take a url or a file.
If there's an easy way I didn't find it... What I did was extend JellyContext in order to have a compileScript method that can use a String (which is fairly easy as what the parser really needs is an InputStream -- give it a ByteArrayInputStream taken from your String's bytes).
Then you have a Script object which you can call the run(JellyContext, XMLOutput) method on.
I use this hack extensively (in a presentation framework that is made of myriads of tiny scripts assembled together at runtime) and have done for a few months now; it may not be the "cleanest" way to do it but it works fine so far. The major problem would be keeping track of changes to the Jelly APIs, in particular JellyContext and Script.
Sylvain.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
