struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject Re: URGENT RE: token issue in hyperlink
Date Thu, 08 Mar 2001 04:58:35 GMT
The session ID will only show up in the URL in two cases:

1) On the first request in the session (i.e. session creation time).
2) When cookies are disabled in the browser.

On the first request, the server sends the session ID back to the browser
both in the URL and in a cookie, because it doesn't know yet whether or not
cookies are enabled. If it discovers that cookies are enabled, it will stop
sending the session ID as part of the URL, and just use cookies from then
on. If, however, cookies are disabled, then it will continue to send the
session ID as part of the URL.

Hope this helps.

--
Martin Cooper

----- Original Message -----
From: "Nanduri, Amarnath" <Amarnath.Nanduri@Agilquest.com>
To: <struts-user@jakarta.apache.org>
Sent: Wednesday, March 07, 2001 8:46 AM
Subject: RE: URGENT RE: token issue in hyperlink


>
> 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:r2126c@email.sps.mot.com]
> Sent: Wednesday, March 07, 2001 11:06 AM
> To: struts-user@jakarta.apache.org
> 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:Amarnath.Nanduri@Agilquest.com]
> >Sent: Tuesday, March 06, 2001 2:23 PM
> >To: 'struts-user@jakarta.apache.org'
> >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..



Mime
View raw message