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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Nathan Stanford SrSenior ProgrammerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.