You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bort <sp...@rogers.com> on 2003/07/21 16:37:34 UTC
Setting a cookie
Hi all
How do I go about setting a cookie via Struts? I've tried this within the
perform() of an Action, and it doesn't seem to work:
Cookie cookie = null;
cookie = new Cookie("u", LoginForm.getUsername());
response.addCookie(cookie);
cookie = new Cookie("p", LoginForm.getPassword());
response.addCookie(cookie);
cookie = new Cookie("g", LoginForm.getGroup());
response.addCookie(cookie);
return mapping.findForward(forward);
Any help would be appreciated,
bort
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org