velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Sidler <>
Subject Re: Velocity-Struts Tokens
Date Mon, 12 Aug 2002 12:07:43 GMT
> Hello,
> I was wondering if someone could please give me the
> low down on using Tokens i.e. Struts tokens with
> velocity. I read through the velocity-tools (struts
> demo), and have not been able to get tokens to work.
> Have been using the $form.getToken() method to render
> the hash but always end up with a  $form.getToken() i
> s not a valid reference. I use the saveToken(request)
> method. Not sure what i'm doing wrong. Any help/input
> would be welcome.

Hi Sujay,
$form.getToken() should work. I have the latest
version of the software online and running at
There you see a working example of all tool methods.

A few things to check:
- Do any of the other methods of the form tool work
   for you? Like $form.getCancelName()

- Do any of the Velocity Struts tools work at all?
   For example $link.getBaseRef()?

- What is the result if you embed this in your template:
   $form $link $msg $errors

   You should see string representations of these four
   tool objects. If not, your configuration of the view tools
   is probably not correct.
   - Make sure the location of the toolbox.xml is defined
     in web.xml
   - Make sure toolbox.xml is exists an is in the right

Hope this help


> thx a ton.
> Sujay
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>
> .

Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message