Snake, that did it, thanks. On 3/14/06, Snake <[EMAIL PROTECTED]> wrote: > Try > > <cfif StructKeyExists(cookie, "#request.app.name#_util")> > > Russ > > -----Original Message----- > From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] > Sent: 15 March 2006 01:25 > To: CF-Talk > Subject: Re: Dynamically naming cookies? > > Ugh. So simple, yet so kicking my butt. > > This is failing: > > isDefined("cookie["#request.app.name#_util"]") > > with an "invalid CFML construct" error > > On 3/14/06, Barney Boisvert <[EMAIL PROTECTED]> wrote: > > This works fine for me: > > > > <cfset an = application.applicationname /> > > > > <cfcookie name="#an#_util" value="test value" /> > > > > <cfoutput>#cookie["#an#_util"]#</cfoutput> > > > > cheers, > > barneyb > > > > On 3/14/06, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote: > > > So would I use that to set the cookie instead of using cfcookie? Or > > > do I use that to just set the cookie name as a variable and then use > > > the variable name where I would normally use a cookie? > > > > > > I ask because I got a "Element wmc_com_util is undefined in a Java > > > object of type class coldfusion.runtime.CookieScope referenced as" > > > error. The existence of wmc_com tells me that the > > > application.applicaitonname variable is being read properly. > > > > > > Thanks, > > > > > > Pete > > > > > > On 3/14/06, Barney Boisvert <[EMAIL PROTECTED]> wrote: > > > > I believe this is what you're looking for? > > > > > > > > <cfset value = cookie[application.applicationname & "_util"] /> > > > > > > > > cheers, > > > > barneyb > > > > > > > > On 3/14/06, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote: > > > > > I'm trying to make some login code more reusable (and friendlier > > > > > to my local development environment). Part of doing this is > > > > > naming a certain cookie based upon the application name. I have > > > > > tried a number of permutaitons of the following: > > > > > > > > > > #evaluate("COOKIE." & application.applicationname & "_util")# > > > > > > > > > > yet I keep getting an undefined error. Is there a better (WHERE > > > > > anything that works = "better") way to do this? > > > > > > > > > > Thanks > > > > > > > > > > Pete > > > > > > > > -- > > > > Barney Boisvert > > > > [EMAIL PROTECTED] > > > > 360.319.6145 > > > > http://www.barneyb.com/ > > > > > > > > Got Gmail? I have 100 invites. > > > > > > > > > > > > > > > > > > > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235408 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

