Hi, Can u pls help me regarding velocity macros . how to create a macro library and also i would like to use a macro to embedd a tree structure in web page
Regards, uday -----Original Message----- From: Shinobu Kawai [mailto:[EMAIL PROTECTED] Sent: Saturday, April 02, 2005 3:37 AM To: Velocity Users List Subject: Re: Loading templates from classpath 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) > What was completely confusing me is that Velocity defines a number of > final static constant strings for properties, but apparently not for > *all* properties. "class.resource.loader.class" is not in, or I couldn't > find it. Anyway... FYI, there's one for "resource.loader". :) Best regards, -- Shinobu -- Shinobu Kawai <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]