So I'm writing a cookie in my action servlet of my struts app. And then I'm reading the cookie in my JSP page. The problem is that the cookie isn't read. At least it isn't read on the first pass. The second pass (a refresh) the cookie is finally picked up. Any way to get around this and why is this happening. Do all cookie reads have to happen in the Servlet?
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
If you need to pass data from a servlet to a page, a cookie is not the best mechanism. You have so much more POWER at your fingertips, why fiddle about with cookies? How about binding an object to a session? Then you'll know if you got the stuff from yourself, or from the client.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus