You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Legolas Woodland <le...@gmail.com> on 2005/09/10 00:17:49 UTC

how to write cookie from a Struts jsp file

Hi
Thank you for reading my post.
How i can write a cookie from a Struts jsp file into client system ?
I mean when user pressed sub,it button i write the cookie 
in a way that i can use it within
logic:present
and logic:notPresents 
tags .

Re: how to write cookie from a Struts jsp file

Posted by Laurie Harper <la...@holoweb.net>.
Legolas Woodland wrote:
> Hi
> Thank you for reading my post.
> How i can write a cookie from a Struts jsp file into client system ?
> I mean when user pressed sub,it button i write the cookie 
> in a way that i can use it within
> logic:present
> and logic:notPresents 
> tags .

There are probably dozens of answers to this... One simple, brute-force 
approach would be to use a scriptlet:

<%
     response.addCookie(new Cookie("xxx","yyy"));
%>

I'm sure there are any number of JSP custom tags out there that let you 
achieve the same result. Google is your friend :-)

L.


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