On Wed, 2005-04-06 at 00:36 +0200, Sebastiano Vigna wrote:

> So the problem is open: how can I load a template from the jar from
> which the class is coming programmatically?

FINALLY, I got it working. It was somehow simpler than expected; my
fault 8^).

The properties you want to change must be passed to init(), or they are
useless. E.g., 

                Properties properties = new Properties();
                properties.setProperty( "resource.loader", "class" );
                properties.setProperty( "class.resource.loader.class", 
ClasspathResourceLoader.class.getName() );
                Velocity.init( properties );

Once that is done, getTemplate( "the/full/path/in/the/jar" ) will work
(I thought the resource loader would have resolved relatively to the
loading class package).e:
-- 
Ciao,

                                        seba

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to