Search code examples
coldfusioncoldfusion-10

Get generated content in ColdFusion


I would like to get the generated content (i.e. the whole HTML page generated by my CF scripts) in the onRequestEnd event in ColdFusion 10. Is there a function which will do this, I can't find one in the docs?

Thanks, Michael.


Solution

  • I cannot specifically test for ColdFusion 10 at the moment as I don't have a CF10 server in front of me, but this works on CF9:

    allOfIt = getPageContext().getOut().getString();
    

    I have no reason to think it would be different on CF10, but sorry that I cannot give a more definitive answer.

    I'll be able to test in about 4h, and will update answer with my findings.