coldfusion-8

Playing around with date range in ColdFusion 8

点点圈 提交于 2019-12-13 03:44:43
问题 Please consider the following code: In this code, a user will be asked to select a date range from the two options and click on apply button so that the result can be displayed on the web browser for the selected date range. I'm wondering how should I proceed. Please throw some light on this. 2) How can I make sure that I can enable the option of downloading the data using "Download CSV" option? Please let me know what changes are required. Any help would be appreciated. <body> <cfparam name=

onSessionEnd has different rootpath then my running application

岁酱吖の 提交于 2019-12-12 17:08:14
问题 I've got a service in my applicationScope that returns an custom object. <cffunction name="getObject" access="public"returntype="com.my.Object"> this is works fine in my application but when i call this function from onSessionEnd like: arguments.ApplicationScope.service.getObject() I get an error that it cannot find the component or interface. When i use a expandPath("/") when calling it from the website i get the path c:/websites/project/htdocs when i call the same from the onSessionEnd i'll

How to secure a webservice CFC for use with AJAX

倖福魔咒の 提交于 2019-12-12 06:31:54
问题 I have a CFC file with remote access enabled, I am using this to perform various admin tasks such as adding / removing image records from a database. The calls to this CFC are made through AJAX via custom JavaScript on my admin pages. I placed the CFC in what I thought was a secured directory but having had some issues with images disappearing of their own accord and I have since found it is not secure at all. I would like to secure the CFC. There is already a session based security CFC that

Wrap fails for HTML content

寵の児 提交于 2019-12-11 13:33:16
问题 I have tried to wrap HTML CMS content, but it fails. Here the code I have tried: <h3>Wrap Example</h3> <cfset test='<h4><span>This is failure wrap function</span></h4><span><h5>This is failure wrap function</h5></span>'> <cfoutput>#Wrap(test, 10)#</cfoutput> The result is given below: Wrap Example This is failure wrap function< /span> This is failure wrap function< /h5> How can fix this issue? 回答1: As per its docs, wrap() operates on a string , not a fragment of HTML . Whilst the latter is

Sorting an implicit array of implicit structs by struct key

最后都变了- 提交于 2019-12-11 11:16:28
问题 Based on the first example in this blog post, I have an implicit array of implicit structs. My data is actually pretty similar, e.g.: <cfset ReportsArray = [ { Name = "My First Report", Group = "Group One" }, { Name = "My Second Report", Group = "Group Two" }, { Name = "My Third Report" Group = "Group One" }, ...etc... ]> I decided to create the data in this format so that I can later push a new report to the array in any group, or just rewrite the array with a new list of reports if needed.

sdelete.exe is not working with cfexecute

此生再无相见时 提交于 2019-12-11 06:18:54
问题 I am trying to run sdelete.exe (http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx) using cfexecute, but I think cfexecute is not even running that command. It's not giving me any permission error. And I have given all admin privileges to ColdFusion service -> logon tab. The following is the line that I have in my .cfm page that run successfully but doesn't delete the file: <Cfexecute name="C:\Inetpub\wwwroot\sdelete.exe" arguments="-p 2 C:\Inetpub\wwwroot\Deepak\testP\removeme.txt

Can a cfargument be of type “list”?

非 Y 不嫁゛ 提交于 2019-12-11 04:01:54
问题 I want to have an argument like this: <cfargument name="exclude" type="list" required="false" default="-1" hint="A list of source IDs that should be excluded" > I don't see it in the docs at http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_a-b_6.html by I don't really trust them. Does anyone know if this is possible or will I have to convert to an array? At the moment I get an error: The EXCLUDE argument passed to the renderSelectSource function is not of type list. It's

CFHTTP Over SSL

非 Y 不嫁゛ 提交于 2019-12-11 03:27:46
问题 I'm trying to retrieve files from a server over SSL using the ColdFusion CFHTTP tag with no success. Our environment is Linux using the Server Configuration. The keystore used is at cf_root/runtime/jre/lib/security/cacerts . I retrieved X.509 certificate (in DER format) from the target server and exported it to a file. On our server, in the folder where cacerts resides, I imported this cert into our cacerts keystore: keytool -import -alias certAlias -file pathToX509Cert -keystore cacerts

Getting CLOB data from ColdFusion 8

一曲冷凌霜 提交于 2019-12-10 21:32:44
问题 I am trying to retrieve CLOB data from our Oracle database. the code is the following: <cfstoredproc datasource="#request.site.datasource#" procedure="GETPAGESWITHMETADATA" result="myResults"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="in" value="News"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="in" value="News Pages"> <cfprocparam cfsqltype="CF_SQL_CLOB" type="out" variable="XML"> <cfprocresult name="rs1"> </cfstoredproc> <cfdump var="#myResults#"> <cfoutput>#XML#</cfoutput> <cfcatch

Using cfif in coldfusion

耗尽温柔 提交于 2019-12-10 15:39:04
问题 For example, please consider the following code snippet: Scenario 1: The company name I received as a part of SOAP response is as follows: <Company>Amazon, Inc </Company> Scenario 2: Another company name I received as a part of SOAP response is as follows: <Company>Google, Inc </Company> Basically, from the user end I am inputting some information and based on that I am getting different company names inside the <Company> tag. The following code shows how I am storing the response in