Return-Path: Delivered-To: apmail-velocity-user-archive@www.apache.org Received: (qmail 17375 invoked from network); 29 Mar 2007 15:35:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 15:35:42 -0000 Received: (qmail 67990 invoked by uid 500); 29 Mar 2007 15:35:48 -0000 Delivered-To: apmail-velocity-user-archive@velocity.apache.org Received: (qmail 67975 invoked by uid 500); 29 Mar 2007 15:35:47 -0000 Mailing-List: contact user-help@velocity.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Velocity Users List" Delivered-To: mailing list user@velocity.apache.org Received: (qmail 67965 invoked by uid 99); 29 Mar 2007 15:35:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 08:35:47 -0700 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of drdonohue@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 08:35:39 -0700 Received: by ug-out-1314.google.com with SMTP id p31so555588ugc for ; Thu, 29 Mar 2007 08:35:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=OhVSa3Z4kv7NSFxCyutgWDDpMIYpP0wQ3/nzMLFUAGR/btSkGRb1Usy8nG69iQufTTsLgZVktq2Rde8I4ip7ZMFY1dlkJbKnWOAU5dO5h3FZYFE74lSQPMQL2zLTM1SBAfzmAwxWaMXVpn4IXpz+0hd8KFTgpmlAB5ppP6Y5nRs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=ueJZnmK/e+GPdG19vmrBxsi1S/hyky7vSChF1Nxjk4y7CfDcp7dwAiDg5Jpm/G4e1k8sJW62bDO+5Xynj0dFdskNLyBOn0PU84oeX7u3JDY3AwZKkJN7x46/FIU5UERGDGMnsvbEDM4ZDiwgo2WNApOS7FYFikaOmBb/TjOthtk= Received: by 10.114.166.1 with SMTP id o1mr283781wae.1175182516993; Thu, 29 Mar 2007 08:35:16 -0700 (PDT) Received: by 10.114.47.13 with HTTP; Thu, 29 Mar 2007 08:35:16 -0700 (PDT) Message-ID: <9c6d4e0f0703290835m5748271dk94cb4c2fe2fa78a5@mail.gmail.com> Date: Thu, 29 Mar 2007 11:35:16 -0400 From: "David Donohue" Reply-To: dd@daviddonohue.com Sender: drdonohue@gmail.com To: "Velocity Users List" Subject: Re: how to configure Velocity entirely programmatically? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_63525_31180931.1175182516848" X-Google-Sender-Auth: 3bf1ec1e840bc5a3 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_63525_31180931.1175182516848 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Nathan and friends, I followed Nathan's fine, detailed instructions on configuring my Velocity Tools 1.3 servlet programmatically. I am running into difficulty with the toolbox. Nathan described this ServletContext application = config.getServletContext(); toolboxManager = ServletToolboxManager.getInstance(application, "path/to/empty/toolbox.xml"); I find that absolute path does not work here. I have also tried a variety of relative paths. I am wondering if configuring the toolbox only works with relative path, which is relative to the servlet's root file path? The trouble is my servlet is set up (in Jetty 6.1.1) to not really have such a root file path. I am using classpathloader, and loading all my .vm files from the classpath. I was able to configure the velocity.properties using an absolute file path, as in public ExtendedProperties loadConfiguration(ServletConfig config) { try { props = new ExtendedProperties("c:/absolute /path/to/velocity.properties"); So am I left with writing my own version of ToolboxManager? Thanks again for any direction!! ------=_Part_63525_31180931.1175182516848--