coldfusion-10

BouncyCastle Library in ColdFusion 10

心不动则不痛 提交于 2019-12-06 05:53:04
I've been trying to get RSA Private Key Encryption working in ColdFusion 10 and installed the BouncyCastle library since it supports the encryption mode that my application requires. Trying to load the library with JavaLoader resulted in errors ("Class is on the bootclasspath" and "JCE cannot authenticate the provider BC") so I had to install it statically... Copy the jar to %CF_ROOT%/jre/lib/ext/ and add the following to %CF_ROOT%/jre/lib/security/java.security : security.provider.<N>=org.bouncycastle.jce.provider.BouncyCastleProvider Without realizing it at the time, I had also removed the

What can CF10 RESTful API do that Coldbox RESTful API cannot do? And vise versa?

坚强是说给别人听的谎言 提交于 2019-12-06 04:39:26
问题 Just started looking at some MVC JS framework / library and most of them expect a RESTful API endpoint, which got me thinking... what can I do using CF10 that cannot be done using CF9 + ColdBox RESTful support, and vise versa? Thank you. 回答1: Restful webservices is a standard concept and all the implementation eventually adhere to those norms. There are already existing frameworks like Taffy, Powernap and frameworks like ColdBox 3, Mach II which can help create restful services in ColdFusion.

Website based on REST in ColdFusion

最后都变了- 提交于 2019-12-06 01:34:17
问题 My company is about to redesign a big project from scratch. We are currently thinking about how to implement data providers. I used to integrate some webservices in the last few months and pretty much like handling data this way. So I was thinking about a RESTful design. We will be using ColdFusion 10 that comes with REST support, but I actually don't like the component structure required for it. The biggest advantage is probably that we'll be able to use REST to provide data for all our

404 Handler Hanging on ColdFusion 10, works perfect on ColdFusion 8

本小妞迷上赌 提交于 2019-12-06 01:21:59
I'm having an odd intermittent issue with the 404 handler pages on our ColdFusion 10 server. Here's the backstory: We have been running 2 load-balanced ColdFusion 8 servers for ages without issue. We have upgraded one of these two servers to ColdFusion 10 in order to soft-launch our ColdFusion 10 upgrade. I've installed Update 8 on the CF10 server, and have removed and re-added the connectors. Both servers are running Windows 2008 R2. I've read several forum posts stating issues with people getting connection reset issues with their 404 pages, but I'm not seeing that particular issue. What I

ColdFusion 10 REST API: How to parse JSON in body of payload

与世无争的帅哥 提交于 2019-12-05 15:56:10
I'm using ColdFusion 10's new build-in RESTful web services feature. When posting data, I'd like to send the payload as JSON in the body of the request. For example: PUT https://mycompany.com/rest/v1.0/widget/261469 HTTP/1.1 Host: mycompany.com Connection: keep-alive Content-Length: 13 Content-Type: application/json {"foo":"bar"} Once this data is posted through the API, how should I parse and deserialize the JSON data on the server? Does ColdFusion REST service have a built-in way to do this? It seems that there is native support to deserialize "form" type (i.e. content-type application/x-www

ColdFusion 10 REST API: How to set status code 201 without RestSetResponse()

浪尽此生 提交于 2019-12-05 07:50:46
I'm using ColdFusion 10's new built-in REST API and I'd like to return a status code of 201 (Created). I first tried the RestSetResponse() approach that's described here: http://www.adobe.com/devnet/coldfusion/articles/restful-web-services.html . It works well, except that it forces you to set the function's returntype to "void". The problem with "void" is that whenever I throw an exception, it no longer returns the proper JSON error message. Throwing this exception: <cfthrow errorcode="400" message="Validation error." /> Returns a nicely formatted JSON when the returntype is "struct": HTTP/1

How to get DateCompare() to behave in ColdFusion 10?

ぐ巨炮叔叔 提交于 2019-12-05 07:12:38
I'm using CF10 with latest update level on Windows in Pacific Standard Time. I need a datecompare() combination that returns 0 but I cannot get it to behave every since Adobe decided to change the behavior of DateConvert() and DateCompare() <cfset filePath = getBaseTemplatePath()> <cfset fileinfo = getFileInfo(filePath)> <cfset lastModified = fileinfo.lastModified> <cfset lastModifiedUTC = dateConvert("local2utc", lastModified)> <cfset lastModifiedUTC2 = dateAdd("s", getTimezoneInfo().UtcTotalOffset, lastModified)> <cfset lastModifiedHttpTime = getHttpTimeString(lastModified)> <cfset

CFHTTP: first request fast, following slow

自闭症网瘾萝莉.ら 提交于 2019-12-05 04:41:25
I'm having a lot of trouble with CF10's CFHTTP at the moment. First, my test script: <CFSET results = arraynew(1) /> <CFLOOP from="1" to="10" index="idx"> <CFSET timer_start = getTickCount() /> <CFHTTP url="https://www.google.de" method="get" result="test" /> <CFSET arrayappend(results, (getTickCount()-timer_start)/1000 & " s") /> </CFLOOP> <CFDUMP var="#results#" /> 10 CFHTTP calls in a row, the time they take gets pushed to an array; that's all. Results of our CF9 server: Results of our CF10 server: Results of our CF10 server with 5 sec delay between CFHTTP calls: I already read on the forum

How to scope closure's variables in CF10?

白昼怎懂夜的黑 提交于 2019-12-05 01:56:50
Quoted from the Adobe ColdFusion 10: Using closures documentation : function helloTranslator(String helloWord) { return function(String name) { return "#helloWord#, #name#"; }; } How to scope helloWord and name properly on the return line? Are they both in Arguments scope? If that's the case, they must be unique? The Closures and functions section also mentions there are 4 more scopes on top of the already long scope search: In closure, following is the order of search for an unscoped variable: Closure's local scope Closure's arguments scope Outer function's local scope if available Owner

Error in cookie expiration date for Chrome

烈酒焚心 提交于 2019-12-04 16:15:44
问题 I am having problem with the cookie expiry date on Chrome. I set two cookies like this using ColdFusion: <cfset thekey = generatesecretkey("DESEDE")> <cfcookie name="cookie1" value="#Hash(userid&thekey,'SHA-256')#" httponly="true" > <cfcookie name="cookie2" value="#thekey#" httponly="true" > They have been working for a while. However, after the upgrade to ColdFusion 10 and working with Chrome, weird thing started to happen. It only happened with Chrome browser. Other browsers do not have