Does not calling document.cookie= create a cookie in my cookies folder? If it does, would it not still create the cookie but have a path value to whatever I set it at?
> -----Original Message----- > From: Spencer W. Thomas [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 11:13 AM > To: JDJList > Subject: [jdjlist] Re: JavaScript and cookies > > > I think that the path value may be relevant. Because the browser may > show you the cookie only if the path "matches" the current URL. Try > setting it to "/" and see if it helps. > > Luc Foisy wrote: > > >The server does not process the cookie at all. The browswer > is doing all the work with the cookie ( at least that was my > intention) > >I mentioned it was using tomcat and jsp incase there was > some weird stuff that I had to take into consideration. > >I set that path to 172.16.0.222 because I was getting > desperate and couldn't figure out why my cookie wasn't writing. > > > >I have no problems with the cookie functions I have, (other > than the load and save methods) the cookie funtions are in > use on another non jsp/tomcat page and work just fine. > > > >The cookies are not even saving, so at this point the > loading is irrelevant and maybe the path is completely > irrelevant knowing that... > > > >Tomcat in no way confuses things does it? > > > > > > > >>From: Spencer W. Thomas [mailto:[EMAIL PROTECTED]] > >>Let me see if I've got this straight. The JavaScript is trying to > >>create the cookie *in the browser.* The server has nothing > >>to do with > >>it (except to read the cookie contents, presumably). If you > >>are setting > >>cookies in the server, it has to happen before any HTML is > >>output by the > >>jsp. > >> > >>The only thing that jumps out at me below is your "path" > >>value. "Path" > >>is not a hostname or IP address, but is a URL path-prefix > >>*within* the > >>host. I typically use "path=/", so that the cookie will be > >>sent along > >>with a request for any URL in the domain to which the > cookie will be > >>sent. If you want to limit the cookie to a particular domain > >>you should > >>set the domain attribute, not the path attribute. > >> > >>See > >>http://www.csc.flint.umich.edu/~hickslm/392/JavaScript/jumping > >>JS/cookies/BillDortchSripts.htm > >>for some useful cookie handling functions. > >> > >>=Spencer > >> > >>Luc Foisy wrote: > >> > >> > >> > >>>Now that we established that JavaScript != Java, i thought > >>> > >>> > >>I'd come ask a JavaScript question here, but really for lack > >>of knowing any better place to go. > >> > >> > >>>Running under tomcat with jsp pages, trying to create > >>> > >>> > >>cookies, but they dont even seem to be made. I was wondering > >>if anyone could point out something I am missing here. > >> > >> > > > > > >____________________________________________________ > >To change your JDJList options, please visit: > >http://www.sys-con.com/java/list.cfm > > > >Be respectful! Clean up your posts before replying > >____________________________________________________ > > > > > > > ____________________________________________________ > To change your JDJList options, please visit: > http://www.sys-con.com/java/list.cfm > > Be respectful! Clean up your posts before replying > ____________________________________________________ > ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________
