Solved

Application.,cfc and changes in this tag

Posted on 2011-02-19
1
867 Views
Last Modified: 2012-05-11
i have defined the application.cfc in my website and used the cfscript> tag to define the settings using the this tag like

<cfscript>
       this.name = "Test";
       this.applicationTimeout = createTimeSpan(0,1,0,0);
       this.clientmanagement= "yes";
       this.loginstorage = "session" ;
       this.sessionmanagement = "yes";
       this.sessiontimeout = createTimeSpan(0,0,20,0);
       this.setClientCookies = "yes";
       this.setDomainCookies = "yes";
       this.scriptProtect = "all";
       if left(server.ColdFusion.ProductVersion,1) GT 8
       this.googlemapkey = "blah blah blah";
       end if
   </cfscript>

now apparently it is throwing error,

 Invalid CFML construct found on line 12 at column 15.
ColdFusion was looking at the following text:

left

The CFML compiler was processing:

    * A script statement beginning with if on line 12, column 12.
    * A cfscript tag beginning on line 2, column 2.

i was sure that it will throw an error but how can i do this in good way

Please guide
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 52

Accepted Solution

by:
_agx_ earned 125 total points
ID: 34934562
if left(server.ColdFusion.ProductVersion,1) GT 8
       this.googlemapkey = "blah blah blah";
end if


That's not valid cfscript.  There's no "end if" and the comparison must be enclosed in parenthesis (...)

ie
if (listFirst(server.ColdFusion.ProductVersion) GT 8) {
    this.googlemapkey = "blah blah blah";
}    

0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question