Return-Path: Delivered-To: apmail-jakarta-velocity-user-archive@www.apache.org Received: (qmail 64220 invoked from network); 1 Apr 2005 21:51:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Apr 2005 21:51:35 -0000 Received: (qmail 22598 invoked by uid 500); 1 Apr 2005 21:51:31 -0000 Delivered-To: apmail-jakarta-velocity-user-archive@jakarta.apache.org Received: (qmail 22578 invoked by uid 500); 1 Apr 2005 21:51:31 -0000 Mailing-List: contact velocity-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Velocity Users List" Reply-To: "Velocity Users List" Delivered-To: mailing list velocity-user@jakarta.apache.org Received: (qmail 22558 invoked by uid 99); 1 Apr 2005 21:51:31 -0000 X-ASF-Spam-Status: No, hits=3.8 required=10.0 tests=DATE_IN_FUTURE_24_48,DNS_FROM_RFC_ABUSE,RCVD_ILLEGAL_IP X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from ms004msg.fastwebnet.it (HELO ms004msg.fastwebnet.it) (213.140.2.58) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 01 Apr 2005 13:51:30 -0800 Received: from urfida.trippa.org (1.93.116.97) by ms004msg.fastwebnet.it (7.2.052.3) (authenticated as sebastiano.vigna) id 423867670033DA97 for velocity-user@jakarta.apache.org; Fri, 1 Apr 2005 23:51:28 +0200 Subject: Re: Loading templates from classpath From: Sebastiano Vigna To: Velocity Users List In-Reply-To: <376e3b140504011343431b750c@mail.gmail.com> References: <1112371242.17459.5.camel@sliver.usr.dsi.unimi.it> <376e3b1405040109477e7b0fad@mail.gmail.com> <1112555790.17637.5.camel@urfida.trippa.org> <376e3b140504011240e8bd65@mail.gmail.com> <1112563042.17637.8.camel@urfida.trippa.org> <376e3b140504011343431b750c@mail.gmail.com> Content-Type: text/plain Date: Sun, 03 Apr 2005 23:50:21 +0200 Message-Id: <1112565021.17637.13.camel@urfida.trippa.org> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-2) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Fri, 2005-04-01 at 13:43 -0800, Shinobu Kawai wrote: > ## Let me guess; you don't want to make a velocity.properties file either. :p 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; } 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... -- Ciao, seba --------------------------------------------------------------------- To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: velocity-user-help@jakarta.apache.org