railo

When should I use # in ColdFusion?

偶尔善良 提交于 2019-12-23 06:57:02
问题 This has been one of the biggest obstacles in teaching new people ColdFusion. When to use # is ambiguous at best. Since using them doesn't often create a problem it seems that most people gravitate to using them too much. So, what are the basic rules? 回答1: I think it may be easier to say where NOT to use #. The only place is in cfif statements, and cfset statements where you are not using a variable to build a string in quotes. You would need to use the # sign in almost all other cases.

Running Lucee on Tomcat and need to server a JSP page

天涯浪子 提交于 2019-12-13 18:06:45
问题 I have a Lucee box that is running with Tomcat. Everything is great with the site and CFM pages. I was recently given a page in JSP that the client would like to run on the site. Everything I had read says no problem so I agreed to run it. Put the file in a directory and instead of "processing" it ran like and html page would and I could see the code. Realized that Tomcat hadn't been instructed to process JSP files so I added <url-pattern>*.jsp</url-pattern> to: <servlet-mapping> <servlet

What version of Hibernate does CFML use?

我们两清 提交于 2019-12-13 14:16:17
问题 The Hibernate docs sometimes refers to differences between different versions. What versions of Hibernate do ColdFusion 10 use? Is it the same in ColdFusion 9? Does Railo stable/bleeding edge use different versions? 回答1: All current engines use version 3.5 , but there are different point releases between CF and Railo. The latest CF beta comes with version 4.1 . ColdFusion 11 BETA uses 4.1.10-Final ColdFusion 10 uses 3.5.2-Final (verified on u11) ColdFusion 9 uses 3.5.2-Final (verified on 9,0

Global Variables in ColdFusion

烈酒焚心 提交于 2019-12-12 19:23:13
问题 2 Questions - In CF8 in the application.cfm I cold set a global variable like so <cfset DSN = "dej6_42"> I am now trying to adjust to the Application.cfc in CF10/Lucee and can not figure out how to set this same variable. Here is my current Application.cfc <cfcomponent output="false"> <cfset This.name = "My Application"> <cfset This.clientmanagement="True"> <cfset This.loginstorage="Session"> <cfset This.sessionmanagement="True"> <cfset This.sessiontimeout="#createtimespan(0,0,10,0)#"> <cfset

CFHTTP Cookie Issue

百般思念 提交于 2019-12-11 20:28:38
问题 I'm having (what I believe to be) a cookie problem with cfhttp under Railo-Express-4.1.1.009. My code performs a two step http call. The first step performs authorization with the remote application. If successful, the remote server returns an authorization cookie, which is extracted and passed to the second call like so: <cfhttp url="http://remoteserver/targetPath" port="xxxx" method="get" result="Local.response" throwonerror="true" redirect="false"> <cfhttpparam name="Action" value="Ping"

Tomcat and Railo need to be case insensitive for migration

风格不统一 提交于 2019-12-11 13:32:45
问题 I am migrating several large sites from ColdFusion, MS SQL and IIS to Railo, MySQL and Tomcat 7. The set up wasn't bad but there is a lot of old code that I will be re-writing where case was not always taken into consideration. Although I am not sure why case sensitivity is such a security threat (coming from the MS world it's never been an issue) but I need to find a way to make Tomcat 7 and Railo find img/employee/greg.jpg when it is in the img/Employee/greg.jpg folder. The E in employee is

DESede (3DES) Encryption in RAILO CFML

大憨熊 提交于 2019-12-11 08:58:21
问题 I've been trying for many days to try and solve this issue. A 3rd Party webservice requires me to send encrypted data using 3DES with ECB and PKCS7padding - They're using .NET The encrypt function within railo CFML is limited to DESede without any further options (i.e. defaults are used for cipher mode and padding). Has anyone had this issue in Railo and come up with a solution (java based perhaps)? - I'm seriously pulling my hair out here! Based on Leigh's suggestions below I made some

Throwing an exception from XSLT

拈花ヽ惹草 提交于 2019-12-11 03:56:30
问题 I need XSLT to stop processing with an error, when an external document is not available. From what I've found out the <xsl:message> tag seems to be the right way to do it, but so far it doesn't work. Here's what I tried: <xsl:if test="not(document('some_external_doc.xml')//myxpath)"> <xsl:message terminate="yes">ERROR: Missing element!</xsl:message> <h1>Error detected!</h1> </xsl:if> The missing document/xpath is detected by the <xsl:if> and the <h1> will be displayed, but for some reason

coldfusion (railo) and cfthread not working as I would expect

我与影子孤独终老i 提交于 2019-12-11 01:03:25
问题 I've not used cfthread before but i'm using the following code and it's not working. <cfloop from="1" to="5" index="local.pageNo"> <cfthread name="thr#local.pageNo#" threadIndex="#local.pageNo#" action="run"> <cfif local.pageNo GT 1> <cfhttp url="#local.apiURL#&page=#local.pageNo#" method="get" result="local.myResults" > </cfhttp> <cfset local.myResponse = deserializejson(local.myResults.filecontent)> </cfif> <cfloop from="1" to="#arrayLen(local.myResponse.result)#" index="i"> <cfset local

htaccess rewrite rules are not working with urls that end with .cfm

为君一笑 提交于 2019-12-10 15:18:51
问题 I'm working on fixing all my URL's to be shorter with 301 redirects. I have fix almost all of them, however there is a url that is ending with .cfm that will not rewrite. FROM: http://www.mydomain.com/index.cfm/catlink/17/pagelink/7/sublink/34/art/41/rec/1/page.cfm TO: http://www.mydomain.com/story/resources/health/page/168/page.html If I change /page.cfm to /page.html then the rewrite will work. Here is the rewrite rule that works for my other urls RewriteRule ^index.cfm/catlink/([a-zA-Z0-9/