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!

Why request.getCookies() return null?

843841May 29 2003 — edited May 29 2003
In my web application, I use Cookie for sessing tracking (Other method not suitable for my case). I link a servlet to a JSP. I set Cookie in the servlet (setPath("/"). The JSP is in another servlet context. I specified crossContext=true in server.xml of Tomcat. But in the JSP code, I use sth like request.getCookies(), but it returned null. And a lot of exceptions were thrown. Why? I am confused. Why doesn' the browser send the Cookie back to JSP (container)?
I am in urgent need of your help!
Thanks in advance. Excuse my bad English:)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2003
Added on May 29 2003
3 comments
2,297 views