tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean McCauliff <se...@narus.com>
Subject Cookies in Redirect
Date Tue, 16 May 2000 21:06:35 GMT
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


Mime
View raw message