Page output redirection from ColdFusion Server

Posted on 1999-12-14
Medium Priority
Last Modified: 2013-12-24
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?
Question by:jamesrowe
1 Comment

Accepted Solution

nathans earned 400 total points
ID: 2281423
You need to you CFHTTP instead of cffile.   CFHTTP you can hit a page and it returns the result and then you save it as a file.

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question