> 
> 
> The book "Instant Javascript" puts it pretty well on page 
> 201, Problems 
> with Cookies (emphasis mine):
> 
>     Cookies are ... designed to appear and disappear according to the
>     path and domain of the *currently viewed* HTML document.

Ok then, this reads HTML rather than jsp? Does any know if this is an issue?

> and on page 203, under "Cookie value won't change":
> 
>     [You can't see the new cookie value ...] You are trying to set a
>     cookie that isn't accessible from the current document's 
> URL. Check
>     the path and domain attributes you are supplying.

This is for changing a value of a cookie, not creating it for the first time. First 
creation of course the cookie should have the same domain ( I am not specifically 
setting that ) and as you previously mentioned, the path should work as \ ( and I know 
this as fact too, since I am using the same cookie creation scripts on another html 
based web site with that path and it works fine )

> Also, on page 183, the author notes that the document.cookie 
> property is 
> "unlike other JavaScript object properties [because] ... If 
> you set the 
> cookie property, its new value won't always match what you set it to."

I am not quite sure what this is telling me. Is that saying what I see in the cookie 
file wont look like what values I saved or is this saying the values I save might not 
come back to me that way ( that seems kinda useless doesnt it )

> =S
> 
> Luc Foisy wrote:
> 
> >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
> >____________________________________________________
> >  
> >
> 
> 
> ____________________________________________________
> 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
____________________________________________________

Reply via email to