Skip to main content
Ben Nadel at InVision In Real Life (IRL) 2019 (Phoenix, AZ) with: Nick Miller
Ben Nadel at InVision In Real Life (IRL) 2019 (Phoenix, AZ) with: Nick Miller

Confirmed Availability Of Java String Methods In ColdFusion

By
Published in Comments (7)

For anyone who follows my blog, you know that I LOVE using the underlying Java methods of ColdFusion objects. I had went back and forth with Ben Forta a bit about this, but apparently, Jason Delmore at MAX 2006 has confirmed that this is, in fact, a completely valid way to program in ColdFusion.

Freakin' sweet ass sweet! Java and ColdFusion is such a sexy couple. They might get the neighbors talking, but I know they're in it for the long haul.

Reader Comments

5 Comments

As I posted in another blog mentioning this exact same thing, if you need to do a lot of string manipulation, you should be using StringBuffer anyway as strings are immutable in Java.

15,841 Comments

Brandon,

While I think that java.lang.StringBuffer is awesome!, it doesn't do the same thing as java.lang.String. Specifically, it doesn't have String::ReplaceAll() and String::ReplaceFirst(). So, in cases where the "lots of manipulation" involves regular expressions, I can't really take advantage of the efficiency of the StringBuffer.

19 Comments

Using Java String methods in ColdFusion should be fine for the forseeable future, but I'd be careful of it even in the near term from the pure Compatibility point of view. BlueDragon.NET is not likely to use the same string methods, and I don't know if even BlueDragon.JAVA or Railo will allow you to use the Java String methods on arbitrary simple variables.

15,841 Comments

Adam,

Interesting point... but out of curiousity, can one usually switch with ease to another programming language and have it be compatible. I know nothing about BlueDragon.Net or Railio so I am not sure what kind of compatability issues there are.

19 Comments

BlueDragon and Railo are non-Adobe implementations of the CFML language. They're 99% compatbile with CFML, but the implementation details are of course slightly different. BlueDragon has a version which is based on .NET instead of Java, and Railo distinguishes itself by outperforming Adobe's ColdFusion in most benchmarks.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel