Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to pass cookies and redirect to a URL

843840Feb 3 2009 — edited Feb 3 2009
Hi,

I am working on a problem where I have to pass values in cookies and then redirect the control to URL.
I have written code something like this.

/*
Cookie c = new Cookie("key","value")
response.addCookie(c);
response.redirect("www.url.com")
*/

Is anything wrong in this code ? The application to which URL refers is unable to see any Cookie information.
All valuable inputs are appreciable.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 3 2009
Added on Feb 3 2009
2 comments
1,669 views