coldfusion

ColdFusion Access Manager Error when attempting to clear trusted cache

耗尽温柔 提交于 2019-12-24 02:13:45
问题 <cfscript> if (isDefined("url.clearTrustedCache")) { clearTrustedCache(); } function clearTrustedCache() { adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login("admin"); runtimeObj = createObject("component","cfide.adminapi.runtime"); runtimeObj.clearTrustedCache(); } </cfscript> I am trying to use the above code to clear the trusted cache via URL param. I am getting the following error message: The current user is not authorized to invoke this method The only

Cannot turn off persistent tracking cookies in CFMX 8

让人想犯罪 __ 提交于 2019-12-24 02:11:57
问题 CFMX 8 Enterprise I have turned on the "Use J2EE session variables" setting under Memory Variables because security requirements state that persistent cookies cannot be used. I understood that turning this setting on will tell CF to only create and use a "JSESSIONID" session cookie. However, my server still appears to be creating and using the old-style "CFID" and "CFTOKEN" cookies with expiration dates thirty years hence. Now, obviously, I can do the old trick of manipulating CFID and

RegEx for Spanish alphabets in ColdFusion 8

二次信任 提交于 2019-12-24 02:01:08
问题 I know that I can use [a-z] to check for any alphabets from a to z in CF 8. However, are there any regex to detect spanish alphabets like á, í, ó, é, ñ, etc.? Thanks in advance, Monte 回答1: ColdFusion doesn't nicely deal with Unicode regex. You can use things like #Chr(375)# to get the characters into a regex string, but it's a bit messy having to do that. However, Java does work with Unicode, and since CF can utilise Java easily, you can use Java regexes to do unicode matching. This will

How to get ID (PK) of newly created record?

余生颓废 提交于 2019-12-24 01:53:33
问题 Given a table: CREATE TABLE [GENERIC_TABLE] ( [RECORD_ID] [int] IDENTITY(1,1) NOT NULL, [SHORT_DESC] [varchar] (50) NULL, CONSTRAINT [PK_GENERIC_TABLE] PRIMARY KEY CLUSTERED ... I want to INSERT a record and get the value of the new RECORD_ID into a ColdFusion variable. What should my CFQUERY look like? (Admittedly, this is probably an overly easy question. In my defense I am used to working with Oracle, not SQL Server.) This for ColdFusion 8, but version-neutral solutions are good. 回答1: If

Coldfusion WSDL IllegalArgumentException on cfinvokeargument

主宰稳场 提交于 2019-12-24 01:47:07
问题 When you are calling a method of a webservice and want to omit an unrequired numeric variable that has a default value set coldfusion will throw the following error: The fault returned when invoking the web service operation is:<br> <pre>'' java.lang.IllegalArgumentException</pre> Example: <cfinvoke webservice = "http://*.cfc?WSDL" method="getFriendlyDay" returnvariable="response" refreshWSDL="true" > <cfinvokeargument name="dayNumber" omit="true"/> </cfinvoke> webservice component:

Is it possible to access the matrix parameters (name-value pair separated by semicolon) in ColdFusion?

会有一股神秘感。 提交于 2019-12-24 01:44:52
问题 I'm new to matrix parameter and I know CF10 can access them through their new RESTful API support. However, is there a way to access these parameters without using RESTful API support? E.g. http://moremaps.com/map/color.cfm;lat=50;long=20;scale=32000 回答1: You can use: color.cfm;lat=50;long=20;scale=32000 Then get the param string with: ListRest(getPageContext().getRequest().getRequestUri(),';') This worked back in CFMX - it's not specific to CF10 or part of the RESTful API, and is available

How can I convert scientific notation to decimal in ColdFusion?

五迷三道 提交于 2019-12-24 01:27:22
问题 I have a number that is represented in scientific notation as 1E-05. I would like to display this value, via ColdFusion, as 0.00001. How do I do that? 回答1: Also worth noting: you can pass any valid number to PrecisionEvaluate() . So, if you have a mix of scientific notation and regular numbers, you are safe to just wrap them all in PrecisionEvaluate(). Examples: PrecisionEvaluate('1E-05') // 0.00001 PrecisionEvaluate('1E-06') // 0.000001 PrecisionEvaluate('10') // 10 PrecisionEvaluate('11

JavaScript variable to ColdFusion variable

痴心易碎 提交于 2019-12-24 01:14:55
问题 I have a tricky one. By means of a <cfoutput query="…"> I list some records in the page from a SQL Server database. By the end of each line viewing I try to add this in to a record in a MySQL database. As you see is simple, because I can use the exact variables from the output query in to my new INSERT INTO statement. BUT: the rsPick.name comes from a database with a different character set and the only way to get it right into my new database is to read it from the web page and not from the

ms access insert into no duplicates

人走茶凉 提交于 2019-12-24 00:56:42
问题 I need to insert into an access database. But skip the row if column dup is already in the table. What I have so far is this: <cfoutput query="hours"> <cfquery name="Employee" datasource="test"> INSERT INTO Tbl_Hours_Comments (ID, ship_num, dup) values(#hours.id#, #hours.ship#, #hours.dup#) </cfquery> </cfoutput> If I don't make dup a Primary Key. Then it will INSERT duplicates. If I make dup a Primary Key. Then I get an error. I think I need something like MySQL. ON DUPLICATE KEY UPDATE. Or

ColdFusion Server Monitoring - Not Working

送分小仙女□ 提交于 2019-12-24 00:54:29
问题 I am trying to launch the ColdFusion Server Monitor on a Windows Server 2003 (Web Edition) machine running ColdFusion 8 (ver. 8,0,0,176276). It is running in stand-alone configuration. The pop-up window launches as http://www.mydomain.com/CFIDE/administrator/monitor/launch-monitor.cfm. However, I get a Flash dialogue box then with the error information 'ColdFusion Server is unavailable'. The dialogue box also has a place to fill out the server details (such as port number and username