velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Khamkar <>
Subject Using Velocity tools with Velocity Engine
Date Mon, 28 Jun 2010 01:25:47 GMT
I want to use Velocity Tools with Velocity Engine in  a standalone
mode. For some reason I am not able to use anything within Velocity

Here is what I have:

I tried several approaches - but the moment anything with Velocity
Tools is accessed - the program seems to hang/stop at the call to
anything in the tools.

Approach 1:

VelocityEngine ve = new VelocityEngine();
	    Context context = new VelocityContext();
	   	    logDebug("here 1");
context.put ("number", new NumberTool());
logDebug ("Here 2");

Does not execute the line below context.put ("number", new
NumberTool()), When I do not have the line context.put ("number", new
NumberTool()), things seem to proceed in a normal way.

Approach 2:
VelocityEngine ve = new VelocityEngine();
 logDebug("here 1");
	    ToolManager manager = new ToolManager();
	    logDebug("here 2...");
	    // manager.configure("/path/to/my/configuration.xml");
	    Context contexttm = manager.createContext();	   	

Does not execute the line below ToolManager manager = new ToolManager().

Using Velocity engine  1.6.3 and velocity tools 2.0


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message