Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

having more than one application 1

Status
Not open for further replies.

leadman

Programmer
Jun 11, 2001
177
US
Hi all,
Im having trouble with application.cfm. Originally i had only the following in it for my shopping cart:

<cfapplication name=&quot;cart&quot;
sessionmanagement=&quot;Yes&quot;
setclientcookies=&quot;Yes&quot;
sessiontimeout=&quot;#CreateTimeSpan(0,1,0,0)#&quot;>

<!--- Monetary Variables --->
<cfparam name=&quot;application.taxrate&quot; default=&quot;0.08&quot;>

Then, as part of creating a login session for admins I added the following:

<cfapplication name=&quot;admin&quot;
sessionmanagement=&quot;Yes&quot;
setclientcookies=&quot;Yes&quot;
sessiontimeout=&quot;#CreateTimeSpan(0,1,0,0)#&quot;>

<cfparam name=&quot;session.isverified&quot; default=&quot;no&quot;>

Now, when i get to the part of the shopping cart that used the application.taxrate variable I get this error:Error resolving parameter APPLICATION.TAXRATE

The application variable TAXRATE does not exist. The cause of this error is very likely one of the following things:

The name of the application variable has been misspelled.
The application variable has not yet been created.
The application variable has timed out.

Any Ideas?
 
leadman,
I think you should use the <CFApplication> tag once in the application.cfm file .. you can write the following code, and I think it will work:

======================================
<CFApplication name=&quot;cart_admin&quot; sessionmanagement=&quot;yes&quot; setclientkookies=&quot;yes&quot; sessiontimeout=&quot;#createTimeSpan(0,1,0,0)#&quot;>

<CFSet application.taxrate = &quot;0.08&quot;>

<CFSet session.isverified = &quot;no&quot;>
======================================

Why do you use CFParam?!! You could use CFSet in this case. I hope that will help you.

NOTE: If you wanna use more than one application.cfm file, devide your Website into FOLDERS and put one application.cfm file in each FOLDER if needed. For example, create a FOLDER called Admin and put the files related to the Administration in it with the application.cfm file which belongs to the Administration.

Regards
 
i get it - another folder it is. As far as using cfparam instead of cfset, the value of 'isverified' should be no unless the person has changed it to yes by entering the right password (which then sets session.isverified to yes). shouldnt I use param in the cfapplication in this case?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top