tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Reeder" <tra...@xabre.com>
Subject RE: Cookies in Redirect
Date Tue, 16 May 2000 22:59:28 GMT
Could someone please answer this question.  I can't find it in the archives.

Travis

-----Original Message-----
From: seanm@narus.com [mailto:seanm@narus.com]
Sent: Tuesday, May 16, 2000 3:07 PM
To: tomcat-user@jakarta.apache.org
Subject: Cookies in Redirect


I am not able to set a cookie in a redirect like this:

     public void doPost(HttpServletRequest request, HttpServletResponse
response)
    throws ServletException, IOException
    {
                    ....................

        Cookie long_term = new Cookie(LONG_TERM_COOKIE_NAME,user_name);
        long_term.setMaxAge(60*60*24*4);
        long_term.setPath("/Blah");
        response.addCookie(long_term);


        response.sendRedirect(REDIRECT_PAGE);
    }

    Is this correct?
    Is there a bug in tomcat?
    Can you set cookies in redirects?

Thanks,
 -Sean


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message