>> From what I understand, you have to drop 
>> a NumberFormat object into the context.
>> Should this be done at startup of the
>> application?
>
> That's not even possible since a new context
> is created for each rendering.

In fact it is possible. Look at the simple example I attached to this
mail. It uses Electric XML and my own simple XML file. Tool doesn't have
to implement VelocityContext if it doesn't need it. Global.java and
Text.java are just for demonstration purposes.

Attachment: Tool.java
Description: Binary data

Attachment: VelocityServlet.java
Description: Binary data

<?xml version="1.0"?>
<tools>
    <tool name="Global" class="com.projectcast.web.tools.velocity.Global" />
    <tool name="String" class="com.projectcast.web.tools.velocity.Text" />
</tools>

Attachment: Global.java
Description: Binary data

Attachment: Text.java
Description: Binary data

Reply via email to