velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastiano Vigna <vi...@dsi.unimi.it>
Subject Re: Loading templates from classpath
Date Tue, 05 Apr 2005 22:36:19 GMT
On Fri, 2005-04-01 at 14:06 -0800, Shinobu Kawai wrote:
> Hi seba,
> 
> > You read my mind. 8^) Here's the catch: put this in the servlet.
> > 
> > protected Properties loadConfiguration( final ServletConfig config ) throws FileNotFoundException,
IOException {
> >        Properties p = super.loadConfiguration( config );
> >        p.setProperty( "resource.loader", "class" );
> >        p.setProperty( "class.resource.loader.class", ClasspathResourceLoader.class.getName()
);
> >        return p;
> > }
> 
> Thanks for sharing your solution with us!  Maybe someday it'll get into the FAQ.
>      http://wiki.apache.org/jakarta-velocity/VelocityFAQ
> ## Anyone can update the wiki, BTW.  B)

BTW, it doesn't work.

I had a symlink to my template floating in the development root. That's
why it was working. 8^( I discovered it when I tried to load *another*
template.

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

                                        seba


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message