You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Nigel Lui <ni...@standardinfo.com> on 2000/04/21 02:42:10 UTC

Setting cookies in my RequestInterceptor

Hi,

I implemented a class that extends BaseInterceptor, and register it
in my server.xml as:
<RequestInterceptor className="com.stdinfo.tomcat.SecurityCheck" />

In the class above, I override the method
public int authenticate( Request request, Response response )
Inside that method, I tried to set cookies thru the interface Response by
using
response.addCookie(cookie);

The problem is my cookie never get to my browser cause the headers are
resetted by the method reset() in the class
org.apache.tomcat.core.ResponseImpl.java

Am I not doing it right, or is there a way to get around it?

Thanks,

-- nl