<cfwhat>

Tuesday, December 22, 2009

Using Java methods in ColdFusion

Because ColdFusion variables map to Java objects it is possible to use Java methods directly on the ColdFusion variables. The methods available depend on the underlying Java data type.

Example:
<cfset string1 = "untitled">
<cfset string2 = string1.substring(2, 7)> produces "title"

Here are some links to the documentation.

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/package-tree.html

http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html

Friday, December 04, 2009

Troubleshooting CFHTTP

Great article on troubleshooting CFHTTP. Helped me fix a connection failure issue that was driving me nuts.

Thursday, September 24, 2009

Web Standards Curriculum

A great online course from Opera covering HTML, CSS, JavaScript and Web Standards.

Monday, September 21, 2009

Useful regular expressions

Strip all HTML tags
REReplace(content,"<[^>]*>","","all")

Strip high ASCII characters (ASCII 128 and above)
REReplace(content,"[^\x00-\x7F]","","all")

Encode all ampersands that are not already encoded
REReplaceNoCase(content, "&(?!amp;)", "&", "all")

Encode all ampersands that are not part of entities
(eg. ignore &nbsp;)
REReplace(arguments.content, "&(?!##?\w+;)", "&", "all")

Validate a list of numbers
REReplace(content,"[^0-9,]","","all")

Strip new lines, carriage returns and tabs
REReplace(content,"[\n\r\t]","","all")

Wednesday, October 29, 2008

ColdFusion performance tuning articles

Coldfusion MX Tuning links by Simon Whatley
Really Fixing Applications - Are We Inside Out? from Alagad
ColdFusion Performance and Troubleshooting Guide (book)
Performance tuning for ColdFusion applications (Adobe)
Troubleshooting Coldfusion Performance: problem, analysis part 1, analysis part 2
Finding memory leaks in your ColdFusion JVM
ColdFusion Memory Leaks, Part 1, Part 2, Part 3
JVM Monitoring Tools For ColdFusion

Thursday, February 21, 2008

Software QA and Testing Resource Center

While I was looking for software to do web application load testing I came across the Software QA and Testing Resource Center. The site has lots of useful information and links, including a good list of Load and Performance Test Tools.

I ended up choosing WebLoad.

Sunday, March 25, 2007

ColdFusion and MSDE 2000 on XP with SP2

I set up a new PC for development at home this weekend and I ran into a (common) problem trying to get ColdFusion to work with MS SQL Server 2000 (MSDE) on XP with SP2. It took me ages but eventually I got it working. The solution was to uninstall the copy of MSDE that I originally put on and do a fresh install using SQL Server SP4 for MSDE. The setup required some parameters, eg.:
setup.exe SAPWD="your_sa_password" DISABLENETWORKPROTOCOLS=0 /L*v C:\MSDELog.log

If you can't get that to run at the command line (I couldn't) then set up a shortcut to setup.exe and put it in the target field.