How to use velocity tools from a non-web-application

2006-09-13 Thread Mohsen Saboorian

Hi,
I'm using Velocity as an embedded template engine for some code generation
in an application. I tried hard to convert a String to an Integer value (so
that I can use it in a simple calculation), but could not do that either
when wrapped attributes in a class with a toInteger() method.

Anyway, I've noticed that there is a tool for that (generic math tool). Is
it possible to use it in my app (the sample projects on the download archive
of velocity-tools are all web application who refer to an XML file through
web.xml). How can I refer to toolbox.xml?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/How-to-use-velocity-tools-from-a-non-web-application-tf2269519.html#a6299220
Sent from the Velocity - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use velocity tools from a non-web-application

2006-09-13 Thread Manish
In a non web application you can simply add an instance of any required tool to 
the Velocty context  can use it in your template.


hth,
- Manish


- Original Message - 
From: Mohsen Saboorian [EMAIL PROTECTED]

To: velocity-user@jakarta.apache.org
Sent: Thursday, September 14, 2006 9:43 AM
Subject: How to use velocity tools from a non-web-application




Hi,
I'm using Velocity as an embedded template engine for some code generation
in an application. I tried hard to convert a String to an Integer value (so
that I can use it in a simple calculation), but could not do that either
when wrapped attributes in a class with a toInteger() method.

Anyway, I've noticed that there is a tool for that (generic math tool). Is
it possible to use it in my app (the sample projects on the download archive
of velocity-tools are all web application who refer to an XML file through
web.xml). How can I refer to toolbox.xml?

Thanks.
--
View this message in context: 
http://www.nabble.com/How-to-use-velocity-tools-from-a-non-web-application-tf2269519.html#a6299220

Sent from the Velocity - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]