Mike, 

       Thanks a lot. It works. I did vote for this enhancement to take
place. One question i have is...how come i don't see the session id in the
address bar ? Is it because GET limits the number of characters that can be
kept in the Address Bar ? Also i did not see the sessionid when i did a
'view source' and checked the source of my generated page. Clarification on
this issue is greatly appreciated.

cheers,
Amar..

-----Original Message-----
From: Michael McCallister [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 11:06 AM
To: [EMAIL PROTECTED]
Subject: Re: URGENT RE: token issue in hyperlink


Here is what I do in a similar situation:

<html:link paramId="role" paramName="role"
 
page='<%="/user/saveUser.do?action=Remove&org.apache.struts.taglib.html.TOKE
N=" 
+
                session.getAttribute("org.apache.struts.action.TOKEN")%>'>
  Remove&nbsp;Role  </html:link>

It's ugly, but it works for now.  Notice the single quotes around the page 
argument.  Very important or the JSP parser will get confused by the 
embedded double quotes in the expression.

I've submitted an enhancement request (Bug #874 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=874) to add an optional 
parameter to the html:link tag that would do this magic without the need 
for the expression shown above.  If I can get Struts set up to build 
locally, I will probably give implementing this a go myself so I can submit 
a patch rather than just a request.  Using the link above, you can vote for 
the implementation of this enhancement.


Mike

At 07:43 AM 3/7/2001, you wrote:

>Hello,
>
>     I have posted this before. This is extremely urgent for me. I know
that
>the token support exists for posting Form(s). How can i ensure that this
>same token will be issued to a hyperlink so that i can validate that the
>user will click on the hyperlink only once ? Any help is greatly
>appreciated. Thanks a lot.
>
>cheers,
>Amar..
>
>
>-----Original Message-----
>From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, March 06, 2001 2:23 PM
>To: '[EMAIL PROTECTED]'
>Subject: token issue in hyperlink
>
>
>
>Hello All ,
>
>      I am using the Action class saveToken() method to ensure that a token
>is created and set (so that the user has proper screen flow). My question
is
>... how can i add this token to a hyperlink ?
>
>  I have a hyperlink in a jsp page, which takes me to a different Action
>class. I am checking for this token in the second Action class. Any help is
>greatly appreciated. Thanks.
>
>cheers,
>Amar..

Reply via email to