I run some metric updating code in onRequestEnd. In certain cases, I want to show a message if the metric update fails. I want to replace what is already in the output buffer. I am trying this in onRequest end:
<cfset pageContent = getPageContext().getOut().getString()> <cfset getPageContext().getOut().clearBuffer()> <cfset pageContent = "hello!"> <cfset writeOutput(pageContent)> <cfset getPageContext().getOut().flush()> But the original HTML is still outputted and my message is not. If I dump the getOut() result it is an empty string. I am not using CFFLUSH anywhere, so why would the HTML already by written from the buffer in onRequestEnd? Brook ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348582 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm