Using RegEx and Java to Split a String in Coldfusion

I was looking for a great way to split a string using a regex expression. Ben Nadel had a good post where he’s creating an RESplit() method. This was a little more than I wanted to go into, and after some more searching I found the solution was to use Java (usually is the solution ;-) as shown by Raymond Camden. So without further discussion, here’s what you need:

// Splitting a query column value by linefeeds
// You could just as easily do this with any RegEx
ItemsArray = myQuery.Notes[1].split( chr(13) );

Change JRun and Coldfusion Log Locations

Best practices dictates that we store our log files on a different drive than the host OS. The idea is to protect our OS in the event our logs get to large (possible if rotation isn’t set up or in some DOS attacks).


Changing the coldfusion logs location is the easiest of all.

  1. Open your browser and navigate to your CF administrator. Usually it will me something like http://localhost:8300/CFIDE/Administrator.
  2. In the menu, under Debugging & Logging click on Logging Settings
  3. Edit the log file system path and submit changes.
  4. Restart your coldfusion server.

JRun Event Logs

You can modify the event log location by editing your server’s jrun.xml. Open that file and do a search for “jrunx.logger.LoggerService”.

You’ll want to edit the “<attribute name=”filename”>{jrun.rootdir}/logs/{}-event.log</attribute>” line.

I’ve run into an issue with setting this path to a different drive than the one your JRun administrator is running from. Will update this post of it find a solution.

More JRun4 logging info can be found at:

JRun stdout and stderr Logs

The out and err log locations are more difficult to modify since you’ve got to edit the Windows registry. You Penguin heads out there should see the Adobe Tech Note at

  1. Open regedit (Start > search regedit)
  2. Backup your registry via File > Export from the regedit console
  3. Navigate the registry to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
  4. Look for your JRun server’s name and edit (right-click > Modify) SystemError and SystemOut. Set the file system path you wish, e.g. E:\JRun\{}\{}-err.log
  5. Go to your Windows Services and restart the JRun server service.