I am currently writing a piece of ColdFusion code to dynamically generate a page which is subsequently saved as flat HTML. Orginally I tried (and succeeded) using the cffile tag to write a huge string (the contents of the dynamically created page) to a file. However this is a very fiddley method to generate flat HTML as to generate the huge content string I had to use many <cfset html = html & "blah"> tags. Consequently any change to the format of the page results in a complicated task of a lot of these <cfset html = ...> tags.
A simpler method to generate the flat HTML would be to "grab" the HTML page output from the ColdFusion server and save that to a file. Therefore, I would like to know if it is possible to redirect the page output from the ColdFusion Server to a given file instead of the browser. If this is possible, how is it done?