Why request.getCookies() return null?
843841May 29 2003 — edited May 29 2003In 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:)