Return-Path: Delivered-To: apmail-jakarta-velocity-user-archive@www.apache.org Received: (qmail 50671 invoked from network); 1 Apr 2005 16:00:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Apr 2005 16:00:50 -0000 Received: (qmail 59624 invoked by uid 500); 1 Apr 2005 16:00:46 -0000 Delivered-To: apmail-jakarta-velocity-user-archive@jakarta.apache.org Received: (qmail 59605 invoked by uid 500); 1 Apr 2005 16:00:46 -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 59592 invoked by uid 99); 1 Apr 2005 16:00:46 -0000 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,TO_ADDRESS_EQ_REAL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from sliver.usr.dsi.unimi.it (HELO sliver.usr.dsi.unimi.it) (159.149.145.121) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 01 Apr 2005 08:00:46 -0800 Received: from sliver.usr.dsi.unimi.it (localhost.localdomain [127.0.0.1]) by sliver.usr.dsi.unimi.it (8.13.1/8.13.1) with ESMTP id j31G0g92021759 for ; Fri, 1 Apr 2005 18:00:42 +0200 Received: (from vigna@localhost) by sliver.usr.dsi.unimi.it (8.13.1/8.13.1/Submit) id j31G0gx0021758 for velocity-user@jakarta.apache.org; Fri, 1 Apr 2005 18:00:42 +0200 X-Authentication-Warning: sliver.usr.dsi.unimi.it: vigna set sender to vigna@dsi.unimi.it using -f Subject: Loading templates from classpath From: Sebastiano Vigna To: "velocity-user@jakarta.apache.org" Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 01 Apr 2005 18:00:42 +0200 Message-Id: <1112371242.17459.5.camel@sliver.usr.dsi.unimi.it> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-2) X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am in the following situation: I'm running a Velocity servlet in Jetty, and everything works fine until I load the template (which Velocity can't found). I would like getTemplate() to load the template from the classpath (i.e., from the jar file), so to have a completely self-contained application. I think this is possible using a classpath loader, but after a lot of reading a couldn't find a single example (and exploring all possibilities is daunting). I would be immensely grateful to anybody pointing me at a code snippet that shows how to do it... -- Ciao, seba --------------------------------------------------------------------- To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: velocity-user-help@jakarta.apache.org