You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Lacy <ml...@Bolt.Mi8.com> on 2004/03/08 21:04:29 UTC

Cookie not getting set from Tiles controller class

I'm wondering if anyone has encountered this.  I am using a login tile that handles whether or not a login form is displayed when viewing a page.  If the user is not logged in and the controller detects a "remember-me" cookie, the controller then calls the code I have to log in a user and passes along the HttpServletResponse object.  The code that logs in a user also sets a cookie.

When the login code is called directly from a Struts action (i.e. when the user logs in using the login form and the request gets passed to the struts action), the cookie gets so correctly and all is well.  However, when a user is not yet logged in and my login tile controller class detects a "remember-me" cookie, the user gets logged in but the cookie does not get added to the "response" object even though I'm calling response.addCookie(cookie).  The code that sets the cookie on the response is the same code that gets called from the struts action.  Therefore the cookie seems to not be getting set on the response only when called from the tiles controller class.

Any ideas?

**********************************************************************
Mi8 Powered Applications - Brains for Business
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been
scanned for the presence of computer viruses.
**********************************************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org