Hy,
thanks to your response. I added the proposed code to my servlet but nothing 
happens. I use the following code to output the timestamp:
$bu.LastVisited

The function "getLastVisited" of the Class of $bu returns a "Date"-Object. 
This outputs the date in "normal" format, no matter whether DateTool is 
embedded or not. With embedded DateTool I tried the "$bu.LastVisited.long" 
but it simply outputs the string "$bu.LastVisited.long" and not the formated 
date.

So how do I use this tool?

Thanks
TO



Am Dienstag 04 April 2006 19:47 schrieb Nathan Bubna:
> You don't have to use a toolbox to use any of the Generic Tools.  Just
> create an instance and add it to your context before the context is
> merged with the template:
>
> context.put("date", new DateTool());
>
> pretty simple.
>
> On 4/4/06, Dominik Bruhn <[EMAIL PROTECTED]> wrote:
> > Hy,
> > I want to use the DateTool (
> > http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tool
> >s/generic/DateTool.html ) in my VelocityApplet. I not using Struts. How do
> > I tell Velocity to use this Tool when outputting Dates. Some tell me
> > about a toolbox.xml, but I don't know hwere to place it and with which
> > content. A simple copy of the jar-file to the classpath didn't help.
> >
> > Who can help?
> >
> > Thanks
> > Dominik
> >
> > ---------------------------------------------------------------------
> > 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]

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

Reply via email to