Think about what happens when you do a forward.  You have the exact same 
request/response (unless you modified it) as you did before.  You add 
cookies to the response so they can be sent back to the browser. 
 Therefore, you're not going to get that cookie until there is another 
request.

In other words, the behavior you're seeing is exactly what should 
happen.  If you want the cookie to "take affect", you're going to have 
to redirect back to the original page instead of forward.

Regards,

Eddie

Hodgeman, Robert (LNG) wrote:

>I've got a JSP page that lists the actions that a user may choose to
>perform, based on whether or not a cookie was found (which indicates that
>the user has previously authenticated with the system):
>
><html:link page="/authenticate">...</html:link>
><logic:present cookie="authenticationInfo">
>    <html:link page="/action1">...</html:link>
>    ...
></logic:present>
>
>So, first time in, the user must authenticate.  The authenticate action then
>places a cookie containing authentication info into the response and
>forwards back to this same JSP.  The idea is that the JSP should now find
>the cookie value and display the additional selections to the user.
>
>However, the <logic:present> tag is not picking up the presence of the
>newly-added cookie value.  If I refresh the JSP page (without re-executing
>the authenticate action), the options show up.
>
>Is there a straightforward way to check for the existence of a newly-added
>cookie (one that did not come in on the request, but has since been added to
>the response)?
>
>Thanks,
>-Bob
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to