Railo Whitespace Management

A little while ago a reader sent me a message asking me if I had any problems with whitespace and carriage returns on BlogCFC under Railo.

The answer was "yes, sort of". If you use whitespace management in Railo you need to be aware that they aren't kidding around. They manage your whitespace alright! I'm guessing they do the following.

  1. Extra carriage returns are removed.(e.g. blank lines)
  2. A Trim on the remaining lines is performed

The consequences of doing this is that all code formatting is gone (tabs, indentations etc), and all extra carriage returns are removed. The problem with this is that it's done on everything, including user generated content (e.g textarea). So in BlogCFC all the carriage returns and shot my formatting unless I typed in p and br tags.

So if you use whitespace management be aware of this feature.

1 Comments to "Railo Whitespace Management"- Add Yours
Jamie Krug's Gravatar FWIW, I tried wrapping a [cfprocessingdirective suppressWhiteSpace="false"] around some pre tags as a workaround, but it did not work -- extra line breaks still removed w/whitespace management enabled in Railo Web Admin.
# Posted By Jamie Krug | 12/1/09 3:42 AM

Powered By Railo

Subscribe

Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.

Tags

adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.

Blogroll

An Architect's View
CFSilence
Rey Bango
TalkingTree

Wish List

My Amazon.com Wish List