Posts

Showing posts with the label Coldfusion

ColdFusion CFID CFTOKEN Get lastvisit timecreated from CGLOBAL

I had a recent need to get information of CFID & CFTOKEN to see how many records we have in our datasource for CDATA, CGLOBAL and also from which date i.e. Last Min date to Last Max date the CGLOBAL table has values for. So I wrote this short query and then finally i cast the column as datetime so we can sort by date otherwise the sort will occur by string. select cast( substring(data, charindex('ts',data) + 4 , 19) as datetime) as 'lastvisit' , cast( substring(data, charindex('ts',data,charindex('ts',data)+4 ) + 4 , 19) as datetime) as 'timecreated', lvisit from cglobal where charindex('ts',data) gets the first occurrence and len('2009-08-18 22:36:55') gives you an idea of how many characters you need to extract and turns out its 19 characters. Link to how ColdFusion Purges Client Variables Hope this helps someone.

ColdFusion Optimization Performance tuning

Nice articles for ColdFusion Optimization and performance tuning. Adobe link for performance and scalability ColdFusion Tips For troubleshooting by Steve Erat ColdFusion Request Tuning Settings in Depth ColdFusion Tips For troubleshooting by Steve Erat Part 2 Nice post by Mark Kruger Sick Server Troubleshooting Part 2 - Things to Try Sick Server Troubleshooting Part 3 - In the Soup About Java Memory Management Toward Better CF Server Administration Part 1 of 2 Toward Better CF Server Administration Part 2 of 3 Updated on Mon Aug 31. From Ben Forta's book, Understanding Java Stack Traces From Exception.log To Be Continued...

Spread The MAX Widget Around, Win Cool Prizes

Image

Birthday Cake using Coldfusion & SQL Server

Image
So, I made this cake for one of my colleagues at work, M.J. , and I was thinking what to write on the cake. After a while, I got this idea of why not write something which she does, i.e. write queries every now and then. So, I wrote a CFQuery tag for her on the birthday cake. ColdFusion is the way to go, pretty much, in normal life too. ;-)

ColdFusion All Scopes Local Variables using Java getPageContext() Method

Hi, You might have heard about CF's undocumented features. One of them came in really handy for me. Its the getPageContext() Method. Using this method, we can list all variable scopes. You could do something like this <cfdump var="#getPageContext().getVariableScope()#"> or <cfdump var="#getPageContext().getBuiltInScopes().Variables#"> to get local variables scope and similarly for other variable scope. I read about this method at 2 great blogs, one by Ben Nadel and other by Mark Kruger . http://www.bennadel.com/index.cfm?dax=blog:758.view http://www.coldfusionmuse.com/index.cfm/2008/7/29/get-all-scopes-for-a-request Hope this helps.

How to write CFID and CFTOKEN as per-session cookies

Nice Article from Adobe highlighting CFID & CFTOKEN, and How to write CFID and CFTOKEN as per-session cookies. Worth Reading. http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_17915 Thanks,

Dreamweaver CS4 - Cool Stuff - Share My Screen - Code Split - View Related files

Hi, I just ended up installing DW CS4 and I noticed some cool features. 1. Go to File Menu, and select Share My Screen. Within minutes after you install Adobe Connect Plug In and the user you invite installs the plug in as well, you will be able to share screens. It just took me and my co-worker(thanks MJ), 2 minutes to test this feature. 2. Another feature. Code Split. You can split the code into 2 parts, so you could be scrolling the code in top section and view the top part or any part at the bottom view. To do this, in your DW, on the very top next to where Menu ends, there is a layout button. If you click on that, you will see different options and one of them is split code. 3. The one I really like the most is the *View Related Files*. We have several includes in our coldfusion code and this features lets me see all the files that are related to this cfm template. I will update this post later. Till then, Bye.

CFSchedule task - how to schedule a job in ColdFusion 7

This article will show how to schedule an automated job in ColdFusion 7 using CF administrator. Login to CF 7 Administrator and from left hand side, under Debugging & Logging, select Scheduled Tasks Option. Select create new. Under task name enter a task name, start date enter the date from which you want to start scheduled task, you could set daily or monthly depending on your preference and make sure specify time, in my case i entered 9:00 AM, under URL I entered my url like this, http://myipaddress/MonthlyReport - DontDelete/R_monthlyreport.cfm where MonthlyReport - DontDelete is a folder to make sure our report runs without any authentication that is usually specified in Root/Application.cfm. Instead of IPAddress, you could enter a url to a site as well but make sure you have right permissions. Finally, you could do save output to file and make sure specify the path to output file like this C:\Inetpub\wwwroot\clientname\MonthlyReport - Dont Delete\RepOut.htm Thats all, and y...

Coldfusion 7 - Accessing images from a network share

So this morning I had an issue where in images were not being displayed. The images are stored on network share on a different machine. I used this code to make it work, thanks to the help provided by http://www.acfug.org/ members. welcome to the test page..... <cfset theFile = "\\servername\sharename\CF_Chart_Share\test.jpg"> <cfif fileExists(theFile)> File exists <cfelse> does not exist </cfif> <br><cfoutput>#theFile#</cfoutput> <br> <!--- we have code in img2.cfm that will get us the image --> <br><img src=" img2.cfm "> The file img2.cfm has the code below <cfcontent type="image/GIF" file="\\servername\sharename\CF_Chart_Share\test.jpg"> I tried adding the code cfcontent in the same page but that was causing only the image to be displayed i.e. no text was being displayed. Hope it helps someone. Ajas.

Webex file extension .wrf will not open or rendered by IIS web server

We recently moved our web application to new server and we noticed that the webex files with extension .wrf was not being shown to user or was not being rendered by IIS. So on doing further research, I came to know that we needed to set a MIME type for the wrf extension. The .wrf extension needs to be set to application/octet-stream. Go to IIS settings, select the website or the web root folder and right click and select properties. Click on HTTP Headers tab and the bottom click on MIME Types button. Click new button and add .wrf in extension and application/octet-stream in MIME Type text box. Click OK and Apply at next screen and you should be done. After I clicked OK and Apply, the screen Inheritance override was shown. I said cancel to all. Here is some info from IIS help. If you set or change a MIME type that conflicts with a setting at another node in the hierarchy, you are prompted with an Inheritance Override dialog box where you can specify the nodes to which the new setting a...

Redirect using Coldfusion or Redirect using IIS

Image
I have a client who has url say www.xyz.com. They want a new url www.abc.com so that when user enters www.xyz.com, the user should see www.abc.com in his address bar of browser. Basically an alias/redirection with address bar showing the new url. I could have done redirection by dns names/url redirection at website level but problem is I have a subfolder application i.e. www.xyz.com/subapp. Now if I do dns/url redirection, and user tries to access subfolder application with this url, www.xyz.com/subapp/home.cfm, it takes the user automatically to www.abc.com/home.cfm i.e. the main application without the subfolder application, and I dont want that. It should take user to www.abc.com/subfolder/home.cfm. So to avoid this redirection at the website level, I added this code in Application.cfm Code: <!-- Relocate if not a secure connection --> <cfif cgi.SERVER_PORT is "80" and CGI.SERVER_PORT_SECURE is "0"> <!---replace xyz with abc ---> <cfset x = ...

Coldfusion CFSELECT Validation Fails

Most of us have issues with Coldfusion CFSELECT Validation i.e. form submits even though he didnt select an entry from drop down list and you have validation in CFSELECT . Here is the solution to this issue. 1. The validation works only if you have size attribute of cfselect set to a value greater than 1. Here is my code that works <cfselect name="sec_question" required="yes" message="You must select a security question to reset your password." size="2"> <option value="1">What is your mother's maiden name? <option value="2">In what city were you born? <option value="3">What is the title of your favorite book? <option value="4">What is your favorite pet's name? </cfselect> 2. Here are some observations a. I didnt require selected="" attribute inside cfselect b. I didnt require Please select a value i.e. with a space or without space(either way, I tried ...

Snip-A-Thon 2007! Contest to win CF Prizes from CFSnippets.org.

Image
Snip-A-Thon 2007! Welcome to Snip-A-Thon 2007!! The purpose of this contest is to encourage snippet submission by www.CFSnippets.org registered users, increase the registered user base and promote the overall concept and usage of www.CFSnippets.org . Click on the banner to visit the site and increase your chance of winning different CF prizes. So get started now. ;-)

Ben Forta's trip - ACFUG group meeting - Coldfusion 8 or code name Scorpio

Hi, Yesterday i.e. May 17th 2007 I attended the Scorpio road tour hosted by none other than Mr. Ben Forta. It was a great presentation and He made it lively with his comments and answers to some of the questions people had during the session. Overall the meeting was great and it was a good experience to meet someone who is the brains behind Coldfusion. It looks like CF 8 would be released in Mid of this year i.e. maybe around Aug or Sept. For the technical side, Ben showed some cool stuff with the code and some new features that have been added in ColdFusion 8. Some enhancements which are worth mentioning are 1) ability to use Ajax for better applications 2) nice pdf features like merging etc 3) ability to control administrator with different access levels 4) threading 5) new text area box … I love this one…. So for example, you don’t have to type html like &lt;p>ajas&lt;/p> etc. The text area box will have icons on the top just like how you have it ...

ColdFusion - Webservice & Java Interaction

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001566.htm http://livedocs.adobe.com/coldfusion/5.0/Developing_ColdFusion_Applications/cfobject8.htm Good Article this one.... http://www.talkingtree.com/blog/index.cfm/2006/7/12/cfinvokeargument-omit-attr Passing input parameters to web services as complex types http://livedocs.adobe.com/coldfusion/6.1/htmldocs/webser39.htm Passing parameters to methods using the cfinvoke tag http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001051.htm#1215321 Using cfinvoke to consume a web service http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001051.htm#1215321 powered by performancing firefox

nictunney.com - Coldfusion MoFo

nictunney.com - Coldfusion MoFo

Setting Mappings on a ColdFusion Site

Setting Mappings on a ColdFusion Site

Macromedia - Developer Center : Using Java and J2EE Elements in ColdFusion MX Applications

Macromedia - Developer Center : Using Java and J2EE Elements in ColdFusion MX Applications

Macromedia - Developer Center : Clustering ColdFusion MX for J2EE for JRun

Macromedia - Developer Center : Clustering ColdFusion MX for J2EE for JRun