Is there a way to store object level information in cookies? From what I understand cookies are limited to storing text level information. If cookies cannot store objects is there another way to store an object in a clients computer? Why would i want to do this? I want to store the objects datatype and not its value alone.
I suppose there's no reason you couldn't serialize an object to a String and then store the string in a cookie. Then, whe you retrieve the cookie, you could de-serialize the string back into an object.
Why not just stuff the object in the HttpSession? It'll be available for the duration of the session only. Unless you're expecting that data to be available forever (or, at least until the user deletes his or her cookies).
Mike -- SCJP, SCWCD
Joined: Sep 12, 2005
Hmmm, I will look into serializing the object and reconstructing it. Hope it works.