velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Khamkar <rkham...@gmail.com>
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
tools.

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();
	ve.init();
	    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();
	ve.init();
 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

-Rohit

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message