You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by sad <sa...@yahoo.com> on 2002/08/12 03:45:32 UTC
Velocity-Struts Tokens
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.
thx a ton.
Sujay
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Velocity-Struts
Posted by Nathan Bubna <na...@esha.com>.
Gabe said:
> Nathan,
> are these patches backwards compatible? If yes,
> does anything speak against applying them now
> to the CVS tree?
well, the ActionMessage(s) classes do not exist in Struts 1.0. so, anyone
trying to run or build this code would be required to upgrade to Struts 1.1.
i'm not sure we want to do that until a 1.1 final is released. hopefully,
the 1.1b2 just released this week will be quite stable, but considering how
much changed since 1.1b1, i'm not sure that'll happen.
of course, we don't even have an alpha release of the velocity-struts stuff
yet, so i guess there isn't really anything to stop us from building against
a struts beta if we want to.
Nathan Bubna
nathan@esha.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Velocity-Struts
Posted by Gabriel Sidler <si...@teamup.com>.
Nathan,
are these patches backwards compatible? If yes,
does anything speak against applying them now
to the CVS tree?
Gabe
Nathan Bubna wrote:
> Jeff said:
>
>>>personally, i am using velstruts with 1.1 and have
>>>added ActionMessages support locally. if you'd
>>>like, i can post the changes for that, but do not
>>>expect them to be committed until a final release
>>>of 1.1.
>>>Nathan Bubna nathan@esha.com
>>>
>>That would be great. I am using Struts 1.02 but I'm
>>moving to the new 1.1-b2.
>>
>
> ok. here's the ActionMessagesTool and a patch for StrutsUtils.
>
> Nathan Bubna
> nathan@esha.com
>
>
> ------------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Velocity-Struts
Posted by Nathan Bubna <na...@esha.com>.
Jeff said:
> > personally, i am using velstruts with 1.1 and have
> > added ActionMessages support locally. if you'd
> > like, i can post the changes for that, but do not
> > expect them to be committed until a final release
> > of 1.1.
> > Nathan Bubna nathan@esha.com
>
> That would be great. I am using Struts 1.02 but I'm
> moving to the new 1.1-b2.
ok. here's the ActionMessagesTool and a patch for StrutsUtils.
Nathan Bubna
nathan@esha.com
Re: Velocity-Struts
Posted by Jeff Corliss <je...@yahoo.com>.
> personally, i am using velstruts with 1.1 and have
> added ActionMessages support locally. if you'd
> like, i can post the changes for that, but do not
> expect them to be committed until a final release
> of 1.1.
> Nathan Bubna nathan@esha.com
That would be great. I am using Struts 1.02 but I'm
moving to the new 1.1-b2.
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Velocity-Struts
Posted by Nathan Bubna <na...@esha.com>.
Jeff said:
> Is the vel-struts toolkit designed to work with Struts
>
> 1.02 or Struts 1.1? If 1.1, are there features of 1.1
> that aren't (yet) covered by the toolkit?
presently, it is designed for 1.02. support for 1.1 features such as
ActionMessages will be added at some point after the final release of Struts
1.1.
personally, i am using velstruts with 1.1 and have added ActionMessages
support locally. if you'd like, i can post the changes for that, but do not
expect them to be committed until a final release of 1.1.
Nathan Bubna
nathan@esha.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Velocity-Struts
Posted by Jeff Corliss <je...@yahoo.com>.
Hi all,
Is the vel-struts toolkit designed to work with Struts
1.02 or Struts 1.1? If 1.1, are there features of 1.1
that aren't (yet) covered by the toolkit?
Thanks.
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Velocity-Struts Tokens
Posted by sad <sa...@yahoo.com>.
Gabriel,
thank you for the reply. Managed to get $form.token to
work. It was a problem with my action code, and not
calling the action before i displayed the page which
in turn didn't create a hash or rather call
$form.token.
Works like a charm. Using Velocity along with Struts
honestly rocks!.. a pleasure to work with.
thanks so much for the hard work and making this
possible.
Regards
Sujay D'Souza
--- Gabriel Sidler <si...@teamup.com> wrote:
> > 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
> http://www.teamup.com:8080/velstrutsdemo/demo.do
> 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
> directory.
>
> Hope this help
>
> Gabe
>
> >
> > thx a ton.
> >
> > Sujay
> >
> > __________________________________________________
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com
> >
> > --
> > To unsubscribe, e-mail:
>
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> > .
> >
> >
>
>
> --
> --
> Gabriel Sidler
> Software Engineer, Eivycom GmbH, Zurich, Switzerland
>
>
> --
> To unsubscribe, e-mail:
>
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Velocity-Struts Tokens
Posted by Gabriel Sidler <si...@teamup.com>.
> 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
http://www.teamup.com:8080/velstrutsdemo/demo.do
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
directory.
Hope this help
Gabe
>
> thx a ton.
>
> Sujay
>
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> .
>
>
--
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>