tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Héritier <aherit...@sopra.com>
Subject RE: Can't use Cookies in tag libraries ?????
Date Tue, 02 Oct 2001 11:42:08 GMT
Same think if I try to add a Cookie in the response from a JSP page :-(

Sniffff

I found that the response is already commited when I'm in the JSP Page.
I don't undestand why !!!
I use a servlet (Action Servlet from Struts Framework) which forward, after an action, to
my JSP page.

Can I bypass the commit of the response ???




> -----Message d'origine-----
> De:	Arnaud Héritier [SMTP:aheritier@sopra.com]
> Date:	mardi 2 octobre 2001 12:13
> À:	Tomcat-User (Adresse de messagerie)
> Objet:	RE: Can't use Cookies in tag libraries ?????
> 
> I just try to test with tomcat 4.0 standalone and I have the same problem :-(
> 
> Craig, an idea ????
> 
> > -----Message d'origine-----
> > De:	Arnaud Héritier [SMTP:aheritier@sopra.com]
> > Date:	mardi 2 octobre 2001 12:03
> > À:	Tomcat-User (Adresse de messagerie)
> > Objet:	Can't use Cookies in tag libraries ?????
> > 
> > Hi all !!
> > 
> > I face up to a problem concerning the use of cookies in a tag library.
> > 
> > In my tag library I would like to store a cookie on the client.
> > I wrote this in the doStartTag method of my tag :
> > 
> > 	HttpServletResponse httpResponse = (HttpServletResponse)pageContext.getResponse();
> > 	Cookie cookie = new Cookie("myCookie","cookie");
> > 	httpResponse.addCookie(cookie);
> > 
> > but when later I retreive the list of cookies, this one is lacking.
> > 
> > I tried to create cookies in my servlet and it works fine.
> > 
> > I don't understand what it can happen !!!
> > 
> > Can't we use cookies from tag libraries ????
> > 
> > my configuration is :
> > Tomcat 3.2.3
> > AJP1.2
> > Apache 1.3.20
> > IE5.5
> > 
> > 
> > Have you any ideas ???
> > 
> > thanks
> > 
> > 
> > Arnaud HERITIER
> > Ingénieur d'études
> > SOPRA. Group
> > EAI Consulting
> > Tel : +33-1-53-33-44-74
> > Email : aheritier@sopra.com
> > 


Mime
View raw message