You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Anagha <an...@gmail.com> on 2006/02/06 14:18:04 UTC

Using Date formatiing with velocity-tools-1.2

Hi,
I'm newbie to velocity and trying out examples.I have been trying to get the
generic velocity tools to work with my java application.
I included velocity-tools-generic-1.2.jar in my classpath and modified "
example.vm" (from app_example1) only to insert "$date".

I found that after merge it's printed as "$date" only instead of actual
today's date.

I don't to intend use servlets at all. I only want to use Velocity Generic
Tools in the templates.

Any help is appreciated.
--
Thanks & Regards,
Anagha

Re: Using Date formatiing with velocity-tools-1.2

Posted by Shashikanth Duchetty <sa...@gmail.com>.
is this same Anagha from Netsurf Communications private ltd Pune..

Shashi


On 2/6/06, Anagha <an...@gmail.com> wrote:
>
> Sorry my fault,
> I should have put the key as
> context.put("date", new DateTool());
> in a Java application and then access it in the template.
> Now it works fine.
>
> On 2/6/06, Anagha <an...@gmail.com> wrote:
> >
> > Hi,
> > I'm newbie to velocity and trying out examples.I have been trying to get
> > the generic velocity tools to work with my java application.
> > I included velocity-tools-generic-1.2.jar in my classpath and modified "
> > example.vm" (from app_example1) only to insert "$date".
> >
> > I found that after merge it's printed as "$date" only instead of actual
> > today's date.
> >
> > I don't to intend use servlets at all. I only want to use Velocity
> Generic
> > Tools in the templates.
> >
> > Any help is appreciated.
> > --
> > Thanks & Regards,
> > Anagha
>
>
>
>
> --
> Thanks & Regards,
> Anagha
>
>

Re: Using Date formatiing with velocity-tools-1.2

Posted by Anagha <an...@gmail.com>.
Sorry my fault,
I should have put the key as
context.put("date", new DateTool());
in a Java application and then access it in the template.
Now it works fine.

On 2/6/06, Anagha <an...@gmail.com> wrote:
>
> Hi,
> I'm newbie to velocity and trying out examples.I have been trying to get
> the generic velocity tools to work with my java application.
> I included velocity-tools-generic-1.2.jar in my classpath and modified "
> example.vm" (from app_example1) only to insert "$date".
>
> I found that after merge it's printed as "$date" only instead of actual
> today's date.
>
> I don't to intend use servlets at all. I only want to use Velocity Generic
> Tools in the templates.
>
> Any help is appreciated.
> --
> Thanks & Regards,
> Anagha




--
Thanks & Regards,
Anagha