CF can't read cookie

I am trying to set and read a cookie in coldfusion, I look in the cookies
folder and it is being created but my readcookie.cfm page cannot find it?
is this because I am trying to retrieve the cookie from the same machine that
sent it or is there another reason  CF cannot find the dam thing.

It works when I hit the page remotly from another computer but I would like
to test it on the server.

Any help would be appreciated.

Thank you
jacqueschoquetteAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
nathansConnect With a Mentor Commented:
Try these files in the same directory


File Cookie.cfm
---------------------
<html>
<head>
      <title>Untitled</title>
</head>
<body>
Setting the Cookie
<cfcookie name="TestCookie" value="Cold Fusion is Awesome.">
<A href="CookieTest.cfm">Test the Cookie</a>
</body>
</html>


File CookieTest.cfm
---------------------
<html>
<head>
      <title>Untitled</title>
</head>
<body>
<cfoutput>#cookie.testcookie#
</cfoutput>
</body>
</html>



0
 
deepchandaCommented:
there should no difference in the cookie behavior with respect to from where the page is accessed. Once the cookie is set in the browser, it should be available using HTTP cookie variable like cookie.mycookie. But this is only after the cookie has been set like if you r using CF then it would be <cfcookie name="mycookie" value="xyz" ....> . make sure when you set the cookie in this way and if you have "path" parameter then also use "domain" to make the cookie available for that particular path and domain.

DC
0
All Courses

From novice to tech pro — start learning today.