aspose file tools*
The moose likes Servlets and the fly likes Cookie Code Not Working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Cookie Code Not Working" Watch "Cookie Code Not Working" New topic
Author

Cookie Code Not Working

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I'm trying to read and write a cookie. I'm doing this within the action in struts. The code that writes the cookie looks like this...



As you can see.. the last line is doing a findForward because this is inside of an action within struts. For some reason this isn't writing any cookies. Other cookies can be written to my system. I've checked where the cookies are stored and saw other cookies and other valeus being written so it isn't my browser settings. I've looped through all of the cookies in the system. The only cookie that shows up is a JSESSSION cookie



Any help would be appreciated.


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Found this to be some problem w/ the domain and the path. When I removed the domain and path, the cookie wrote fine. Not sure why. When this goes to production though it will definitely have to have the domain and path in place.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cookie Code Not Working