velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@alaska.net>
Subject Re: creating new instances
Date Sun, 05 Sep 2004 01:25:52 GMT
Lawrence.Siden@MSCsoftware.com wrote:
> I already tried going that route, w/ a toolbox.xml.  I was able to verify 
> that the classes I refered to in toolbox.xml were being loaded.  Whoever 
> created this in-house framework I'm using did something in the DVSL 
> sources and rebuilt it so that I still could not access them from the 
> Velocity context.  I think I tried something like 
> "$context.toolbox.myClass ..." but nothing seemed to work.  But I'm going 
> to try Shinobu's method using Class.forName right away!

If you have a toolbox entry like:

  <tool>
     <key>math</key>
     <scope>application</scope>
     <class>org.apache.velocity.tools.generic.MathTool</class>
  </tool>

Then, you access it using $math.some_method_on_MathTool()

---------------------------------------------------------------------
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