<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ColdFused? &#187; Rupesh Kumar</title>
	<atom:link href="http://www.rupeshk.org/blog/index.php/author/rupesh-kumar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rupeshk.org/blog</link>
	<description>My Views on ColdFusion, Java and related technologies</description>
	<lastBuildDate>Fri, 19 Nov 2010 14:22:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Devnet Article on ColdFusion Performance tuning</title>
		<link>http://www.rupeshk.org/blog/index.php/2009/06/devnet-article-on-coldfusion-performance-tuning/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2009/06/devnet-article-on-coldfusion-performance-tuning/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 13:38:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2009/06/13/devnet-article-on-coldfusion-performance-tuning/</guid>
		<description><![CDATA[In case you haven&#8217;t seen it yet, there is a new devnet atricle that was published this week on &#34;Performance tuning for ColdFusion Application&#34;. Its an excellent article written by Kunal from the ColdFusion team. It gives a great insight into how to go about tuning your JVM, how to tune the VM&#8217;s Garbage collector [...]]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t seen it yet, there is a new devnet atricle that was published this week on &quot;<a href="http://www.adobe.com/devnet/coldfusion/articles/coldfusion_performance.html">Performance tuning for ColdFusion Application</a>&quot;. Its an excellent article written by Kunal from the ColdFusion team. It gives a great insight into how to go about tuning your JVM, how to tune the VM&#8217;s Garbage collector settings and how to tune different settings in ColdFusion server. It also gives some tips on best practices for writing ColdFusion application from a performance perspective. Overall an excellent article. </p>
<p>However, there is one mistake in the fourth page where it suggests to use File functions instead of File tag which I would like to correct. Actually it should have suggested to use <a href="http://coldfused.blogspot.com/2007/07/new-file-io-in-coldfusion-8.html">new File functions that were introduced in ColdFusion 8</a> instead of older File functions or cfile tag.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2009/06/devnet-article-on-coldfusion-performance-tuning/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ColdFusion Livedocs on AIR</title>
		<link>http://www.rupeshk.org/blog/index.php/2008/07/coldfusion-livedocs-on-air/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2008/07/coldfusion-livedocs-on-air/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 08:45:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2008/07/01/coldfusion-livedocs-on-air/</guid>
		<description><![CDATA[I was doing a code review for Vinu today (dont ask me which feature it was  ) and we needed to check the reference doc for a tag. And instead of opening the local doc page, he opened this cool application that had livedocs and it was blazing fast (I know Livedocs sucks ! [...]]]></description>
			<content:encoded><![CDATA[<p>I was doing a code review for Vinu today (dont ask me which feature it was <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) and we needed to check the reference doc for a tag. And instead of opening the local doc page, he opened this cool application that had livedocs and it was blazing fast (I know Livedocs sucks ! and yes I work for Adobe <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). </p>
<p>I was like &#8216;whoa!! thats a cool app.. Did you write it? Why dont you release it for public??&#8217; And then he told me that some one from the community had written it and its already available for everyone. It has been developed by <a href="http://www.brianflove.com">Brian Love</a> and it is available <a href="http://www.brianflove.com/public/CFDocsOnAIR/">here</a>. It has very small size application, very lightweight and extremely fast.</p>
<p>So in case you haven&#8217;t downloaded it, <a href="http://brianflove.com/air/CFDocs.air">download it</a> now!! I am sure you would love it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2008/07/coldfusion-livedocs-on-air/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Back from hiatus</title>
		<link>http://www.rupeshk.org/blog/index.php/2008/06/back-from-hiatus/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2008/06/back-from-hiatus/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 13:37:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2008/06/27/back-from-hiatus/</guid>
		<description><![CDATA[I took a long long break from blogosphere and now that I am rejuvenated after CFUnited, I am back.   Thinking about it, it was a really long break &#8211; my last post was on Feb 18th which makes it 4 months. So what did I do in those last 4 months? Well lot [...]]]></description>
			<content:encoded><![CDATA[<p>I took a long long break from blogosphere and now that I am rejuvenated after CFUnited, I am back. <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thinking about it, it was a really long break &#8211; my last post was on Feb 18th which makes it 4 months. So what did I do in those last 4 months? Well lot of things <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<ul>
<li>I GOT MARRIED <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  So thats the biggest thing that happened. I took a one month long vacation to get married, went to Mauritius for my honeymoon and we had a really great time. Here is one of our pics. In case you want to see more of these, you can head over to <a title="http://www.flickr.com/photos/kum_rupesh" href="http://www.flickr.com/photos/kum_rupesh">Flickr</a>. <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  </li>
</ul>
<p>&#160; <img style="margin:0 0 0 200px;" src="http://lh5.ggpht.com/rupeshk/SAZJOhUMTKI/AAAAAAAAAHw/xARoHUVZiLk/IMG_0920.jpg?imgmax=400" /></p>
<ul>
<li>There was a more than one month long Cricket series called &quot;Indian Premier League&quot; and I watched each and every match <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </li>
<li>All of us in the ColdFusion team were quite busy (and still are) in research, planning and implentation for the Centaur. In other words, I was working for you guys. </li>
</ul>
<p>Now that I am back, you should see some regular posts from me. The next one goes in a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2008/06/back-from-hiatus/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Reading Flash (Swf) metadata from ColdFusion</title>
		<link>http://www.rupeshk.org/blog/index.php/2008/02/reading-flash-swf-metadata-from-coldfusion/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2008/02/reading-flash-swf-metadata-from-coldfusion/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 17:34:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2008/02/15/reading-flash-swf-metadata-from-coldfusion/</guid>
		<description><![CDATA[Wouldn&#8217;t it be cool if you could read the meta-data of Swf file in ColdFusion? The most common use case I can think of is to find the dimension of swf movie so that you can set the dimension for the same in object tag while you are embedding the flash movie in your page. [...]]]></description>
			<content:encoded><![CDATA[<p>Wouldn&#8217;t it be cool if you could read the meta-data of Swf file in ColdFusion? The most common use case I can think of is to find the dimension of swf movie so that you can set the dimension for the same in object tag while you are embedding the flash movie in your page. And the good news is that you can do that currently in ColdFusion with just 2-3 lines of code!! All you need to do is to create a TagDecoder and decoder the header with it. Here is the complete code.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #000099;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfscript</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #000099;">  fis <span style="color: #0000FF;">=</span> <span style="color: #800080; font-weight: bold;">createObject</span><span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;java&quot;</span>, <span style="color: #009900;">&quot;java.io.FileInputStream&quot;</span><span style="color: #0000FF;">&#41;</span>.init<span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;C:<span style="color: #009900;">\t</span>est.swf&quot;</span><span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #000099;"> <span style="color: #808080; font-style: italic;">// Create the FileInputStream</span></span>
<span style="color: #000099;">  decoder <span style="color: #0000FF;">=</span> <span style="color: #800080; font-weight: bold;">createObject</span><span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;java&quot;</span>, <span style="color: #009900;">&quot;macromedia.swf.TagDecoder&quot;</span><span style="color: #0000FF;">&#41;</span>.init<span style="color: #0000FF;">&#40;</span>fis<span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #000099;"> <span style="color: #808080; font-style: italic;">// create TagDecoder</span></span>
<span style="color: #000099;"> <span style="color: #0000FF;">header</span> <span style="color: #0000FF;">=</span> decoder.decodeHeader<span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span>; </span>
<span style="color: #000099;"><span style="color: #808080; font-style: italic;">// Decode the header.</span></span>
<span style="color: #000099;">fis.close<span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span>; </span>
<span style="color: #000099;">rect <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">header</span>.<span style="color: #0000FF;">size</span>;</span>
<span style="color: #000099;"><span style="color: #800080; font-weight: bold;">WriteOutput</span><span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;</span>
<span style="color: #000099;">    Is Compressed : #header.compressed#&lt;br&gt;</span>
<span style="color: #000099;">    Frame Count : #header.framecount#&lt;br&gt;</span>
<span style="color: #000099;">    Frame rate : #header.rate#&lt;br&gt;</span>
<span style="color: #000099;">    Version : #header.version#&lt;br&gt;</span>
<span style="color: #000099;">    Height : #rect.getHeight()#&lt;br&gt;</span>
<span style="color: #000099;">    Width : #rect.getWidth()#&quot;</span><span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #000099;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfscript</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p></p>
<p>
The height and width value that you see here would be in <a href="http://en.wikipedia.org/wiki/Twips">twips</a> which is defined as 1/20 of a point or 1/1440 inch. This means, for a 72 dpi screeen, you will have to divide it by 20 to get the height and width in pixels.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2008/02/reading-flash-swf-metadata-from-coldfusion/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Adobe ColdFusion Survey</title>
		<link>http://www.rupeshk.org/blog/index.php/2008/01/adobe-coldfusion-survey/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2008/01/adobe-coldfusion-survey/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 18:55:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2008/01/14/adobe-coldfusion-survey/</guid>
		<description><![CDATA[As promised earlier, here they come. As part of the research for Centaur (next major version of ColdFusion aka ColdFusion 9), we need your feedback on ColdFusion 8 features, what enhancements do you need in them, what new features you want in the new release etc etc. 
Adobe ColdFusion Survey
We would also like your inputs [...]]]></description>
			<content:encoded><![CDATA[<p>As promised <a href="http://coldfused.blogspot.com/2008/01/adobe-coldfusion-ide-survey.html">earlier</a>, here they come. As part of the research for Centaur (next major version of ColdFusion aka ColdFusion 9), we need your feedback on ColdFusion 8 features, what enhancements do you need in them, what new features you want in the new release etc etc. </p>
<p><a href="http://www.surveymonkey.com/s.aspx?sm=yLcENFTqjkIn6gqoFpRiUQ_3d_3d">Adobe ColdFusion Survey</a></p>
<p>We would also like your inputs on platform and vendor support for upcoming ColdFusion release.</p>
<p><a href="http://www.surveymonkey.com/s.aspx?sm=_2fJgulePMz_2f1GM6FGV6uMUQ_3d_3d">Platform and Vendor Support</a></p>
<p>Please do take some time to take this survey as this would really help us shape the new features in the upcoming version. THIS is YOUR chance to get your favorite features in !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2008/01/adobe-coldfusion-survey/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Encrypted CFML Templates</title>
		<link>http://www.rupeshk.org/blog/index.php/2008/01/encrypted-cfml-templates/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2008/01/encrypted-cfml-templates/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 16:49:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2008/01/02/encrypted-cfml-templates/</guid>
		<description><![CDATA[Coming back from the 10 days shutdown period that we had at Adobe, I am catching up with the blogs and I read this interesting post by Ray where he mentioned that some one got his cfml templates encrypted and then lost the originals. Hmmm.. that is a situation, I would never want to be [...]]]></description>
			<content:encoded><![CDATA[<p>Coming back from the 10 days shutdown period that we had at Adobe, I am catching up with the blogs and I read <a href="http://www.coldfusionjedi.com/index.cfm/2007/12/28/Ive-decrypted-my-CFML-templates-and-lost-the-originals-now-what">this interesting post</a> by <a href="http://www.coldfusionjedi.com">Ray</a> where he mentioned that some one got his cfml templates encrypted and then lost the originals. Hmmm.. that is a situation, I would never want to be in. In case you have not figured it out yet, it is not possible to get back the original source. Let me explain.</p>
<p>Why do we need to encrypt cfml templates? To protect the cfml code and your intellectual properties (IP) in case you want to distribute your CF application. Right? In pre-CFMX7 era, ColdFusion used to have &quot;cfencode&quot; utility which used to encrypt the template which you can then distribute to anyone. ColdFusion used to know how to decrypt that and then how to execute that. However, this was not a good solution as people came up with utility to decode this encrypted file. And THAT means that&#160; your code and IP was not protected at all. This had another disadvantage &#8211; template execution was slower as it meant decrypting the template first and then compiling/executing it.</p>
<p>With CFMX7, this changed. ColdFusion came up with sourceless deployment to make it nearly impossible to decode it back to the original source. When you use &#8216;<a href="http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&amp;file=00001762.htm">cfcompile</a>&#8216; with deploy option, your cfml template is compiled to java byte code (class) but the file in which this byte code is written still retains the same template name. To give an example, if you run cfcompile on &quot;hello.cfm&quot;, the output would still be &quot;hello.cfm&quot; but it will actually be java class file. To confirm this, just open one of such encrypted file in a hex editor and you would see the first 8 bytes will be CAFEBABE &#8211; the magic number for java class files. This file can then be distributed to your customers. For execution, ColdFusion works smart &#8211; when request comes for this template, it sees that it is not a cfml template but a class file, skips parsing and compiling the template, and directly proceeds with the execution. </p>
<p>As you see, there is no encryption and no key involved here. The encrypted file is simply a java class file and I have not heard of any utility that can decompile this class file back to cfm source. Though there are many Java decompilers available which can convert the class file to approximate java source file, it will be a huge huge task to write a decompiler which can generate cfm code for class file. One needs to know how CF does the code generation, know a great deal about bytecode instructions and apply lots and lots of heuristic to get the approximate cfm source. This is definitely not an easy thing to do even if some one breaks open the CF engine to see how it generates the java code from cfm code.</p>
<p>The bottom line is &#8211; in case you use sourceless deployment, ALWAYS backup your original source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2008/01/encrypted-cfml-templates/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>JRun updater 7 released</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/11/jrun-updater-7-released/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2007/11/jrun-updater-7-released/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 16:02:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/11/21/jrun-updater-7-released/</guid>
		<description><![CDATA[JRun 4 updater 7 got released last week and is publicly available for download. It now supports a host of new platforms, includes upgrades to existing software components and fixes for many critical bugs.
Some of the important platform support include

JDK 1.6 support
Support for Windows Vista.
Mac OS X 10.4 on Intel 
64-bit Support on Solaris-SPARC. 
IIS7 [...]]]></description>
			<content:encoded><![CDATA[<p>JRun 4 updater 7 got released last week and is publicly <a href="http://www.adobe.com/support/jrun/updaters.html">available for download</a>. It now supports a host of new platforms, includes upgrades to existing software components and fixes for many critical bugs.</p>
<p>Some of the important platform support include</p>
<ul>
<li>JDK 1.6 support</li>
<li>Support for Windows Vista.</li>
<li>Mac OS X 10.4 on Intel </li>
<li>64-bit Support on Solaris-SPARC. </li>
<li>IIS7 support.</li>
<li>Apache 2.2.x support </li>
<li>SunOne Webserver 7</li>
<li>IBM JDK 1.5</li>
</ul>
<p>Another important reason why you might want this is &#8211; a very significant performance improvement in web clustering. Check out the detailed <a href="http://www.adobe.com/support/documentation/en/jrun/4/updater7/releasenotes_4_updater7.pdf">release notes here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2007/11/jrun-updater-7-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhancements to CFDocument in ColdFusion 8</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/07/enhancements-to-cfdocument-in-coldfusion-8/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2007/07/enhancements-to-cfdocument-in-coldfusion-8/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 11:51:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[cfdocument]]></category>
		<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/07/19/enhancements-to-cfdocument-in-coldfusion-8/</guid>
		<description><![CDATA[As you all know, CFDocument tag is used to easily create pdf or flashpaper documents from HTML/CFML content. ColdFusion 8 has added lot of enhancements to it and in this post we will talk about those enhancements.  
1. Bookmark : You can create bookmarks for each section of the pdf using &#8220;bookmark&#8221; attribute. The [...]]]></description>
			<content:encoded><![CDATA[<p>As you all know, CFDocument tag is used to easily create pdf or flashpaper documents from HTML/CFML content. ColdFusion 8 has added lot of enhancements to it and in this post we will talk about those enhancements.  </p>
<p>1. <strong>Bookmark</strong> : You can create bookmarks for each section of the pdf using &#8220;bookmark&#8221; attribute. The bookmark created is of only one level and its name is set to the documentsection&#8217;s name. Here is a sample code for creating pdf with bookmarks.  </p>
<div class="code">
<pre>&lt;cfdocument format="PDF" bookmark="yes"&gt;   &lt;cfdocumentsection name="Introduction"&gt;       &lt;h3&gt;Introduction&lt;/h3&gt;       &lt;p&gt;The introduction goes here.&lt;/p&gt;   &lt;/cfdocumentsection&gt;   &lt;cfdocumentsection name="Chapter 1"&gt;       &lt;h3&gt;Chapter 1: Getting Started&lt;/h3&gt;       &lt;p&gt;Chapter 1 goes here.&lt;/p&gt;   &lt;/cfdocumentsection&gt;   &lt;cfdocumentsection name="Chapter 2"&gt;       &lt;h3&gt;Chapter 2: Building Applications&lt;/h3&gt;       &lt;p&gt;Chapter 2 goes here.&lt;/p&gt;   &lt;/cfdocumentsection&gt;   &lt;cfdocumentsection name="Conclusion"&gt;       &lt;h3&gt;Conclusion&lt;/h3&gt;       &lt;p&gt;The conclusion goes here.&lt;/p&gt;   &lt;/cfdocumentsection&gt;&lt;/cfdocument&gt;</pre>
</div>
<p>2. <strong>Proxy Support</strong> : With ColdFusion 8, you can now provide proxy configuration to cfdocument for retrieving external content like images. This will be useful in situation where the machine hosting ColdFusion is connected to the external world via a proxy. The new attributes added for this (which are self explanatory) are listed below</p>
<ul>
<li>proxyHost</li>
<li>proxyPort</li>
<li>proxyUser</li>
<li>proxyPort </li>
</ul>
<p>3. <strong>Content from URL : </strong>Though this was added in 7.0.2, I think it makes sense to add here because it was not there in 7. <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Have you ever created or wanted to create a pdf from a web page? If yes, then the new attribute &#8220;<strong>src</strong>&#8221; in cfdocument and cfdocumentsection tag makes it very easy to do this. Here is an example to do this.</p>
<div class="code">&lt;cfdocument format=&#8221;pdf&#8221; <strong>src</strong>=&#8221;http://www.google.com&#8221; /&gt;</div>
<p>
<p> 4. <strong>Basic Authentication</strong> : If the CFDocument body contains a resource (e.g; image or URL) that is protected with basic authentication, ColdFusion 7 can not retrieve it and it was one of the reason for getting &#8220;red-x&#8221; for images. (See <a href="http://coldfused.blogspot.com/2005/11/missing-images-in-cfdocument.html">my old post</a> on this). ColdFusion 8 addresses this by adding these two attributes to cfdocument and cfdocumentsection tag.</p>
<ul>
<li>authuser &#8211; user name to be used for basic authentication.</li>
<li>authpassword &#8211; password to be used for basic authentication.</li>
</ul>
<p>5. <strong>User Agent : </strong>There are some cases where the web server is configured to allow requests only from a certain set of browsers (User agents to be precise) to prevent spiders and bots from overloading the server. In ColdFusion 7, when CFDocument creates a URLConnection for an image, it sends a &#8220;User-Agent&#8221; header, that looks like &#8220;User-Agent:Java/1.4.2_07&#8243;, in the HTTP request. If the web server does not recognize &#8220;Java&#8221; user-agent, it returns a status code of 404 (resource not found) and hence the images can not be displayed. ColdFusion 8 adds a new attribute &#8220;user-agent&#8221; to address this.</p>
<ul>
<li>user-agent : User agent to be used for making http connection. The default value will now be &#8220;ColdFusion&#8221;. If this also does not work, you can use the same string that browsers like IE or firefox use. This attribute has been added to &lt;cfdocument&gt; and &lt;cfdocumentsection&gt; tag.</li>
</ul>
<p>6. <strong>PDF name</strong> : When a pdf generated by cfdocument is sent to the browser and you try to save it, the browser will prompt with the cfm name for the pdf which is generally not desirable.  With ColdFusion 8, you can provide the appropriate name in &#8220;saveAsName&#8221; attribute of cfdocument.</p>
<ul>
<li>saveAsName &#8211; Name that appears in the &#8217;saveAs&#8217; dialog when you try to save the pdf from the browser (Generally File -&gt; saveAs). This name will not work if you use &#8220;save&#8221; dialog of the pdf plugin.</li>
</ul>
<p>Here is a sample code for the same.</p>
<div class="code">
<pre>&lt;cfdocument format="pdf" saveAsName="mypdf"&gt; &lt;p&gt;This is a PDF document.&lt;/p&gt;&lt;/cfdocument&gt;</pre>
</div>
<p>7. <strong>Local URLs : </strong>When CFDocument body contains a relative URL, ColdFusion will resolve the relative URL to an absolute URL and will send an HTTP request for this url. A side effect of this is &#8211; Server ends up sending HTTP request even for local URL or images that are lying on the local file system which obviously hurts the performance. In ColdFusion 8, we have added a new attribute &#8220;localURL&#8221; to cfdocument tag which if enabled, will try to resolve the relative URLs as file on the local machine.</p>
<ul>
<li>localURL : &#8220;true&#8221; | &#8220;false&#8221; &#8211; It should be enabled if the images used in cfdocument body are on the local machine. This would make the cfdocument engine retrieve the images directly from the file system rather then asking the server for it over http. </li>
</ul>
<p>This attribute helps reducing the load from the server so that the same web server thread can now serve user request instead of serving local images to CFDocument. This also addresses some of the &#8220;missing image&#8221; problems which I mentioned <a href="http://coldfused.blogspot.com/2006/09/workaround-for-cfdocument-missing_19.html" target="_blank">here</a>. Here is a sample code using this attribute.</p>
<div class="code">
<pre>&lt;cfdocument format="PDF" localUrl="true"&gt; &lt;table&gt;  &lt;tr&gt;     &lt;td&gt;bird&lt;/td&gt;     &lt;td&gt;&lt;image src="images/bird.jpg"&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;     &lt;td&gt;Rose&lt;/td&gt;     &lt;td&gt;&lt;image src="images/rose.jpg"&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/table&gt;&lt;/cfdocument&gt;</pre>
</div>
<p>8. <strong>Section Page Counts : </strong>CFDOCUMENT scope contains two new variables which give you the page counts for document section.</p>
<ul>
<li>TOTALSECTIONPAGECOUNT &#8211; total no of pages in the current section</li>
<li>CURRENTSECTIONPAGENUMBER &#8211; Current page number in the current section.</li>
</ul>
<p>9. <strong>Dynamic header and footer : </strong>CFDOCUMENT scope variables can now be used in expressions inside &lt;cfdocumentitem&gt; which makes it possible to have dynamic header and footers. You can now build logic for header/footer content based on the page number. Here is a sample code which prints section title if the page is even and prints the page no otherwise. Below is a code snippet which creates a dynamic header.</p>
<div class="code">
<pre>    &lt;cfdocumentitem type="header"&gt;       &lt;cfif (cfdocument.currentpagenumber mod 2) is 0&gt;           &lt;cfoutput&gt;#sectionTitle#&lt;/cfoutput&gt;       &lt;cfelse&gt;           &lt;cfoutput&gt;#cfdocument.currentpagenumber# of #cfdocument.TOTALPAGECOUNT#&lt;/cfoutput&gt;        &lt;/cfif&gt;   &lt;/cfdocumentitem&gt;</pre>
</div>
<p>10. We have also fixed most of the CFDocument related bugs e.g text chopping, image cropping or red-x, image scaling, &#8220;Document has no pages&#8221; etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2007/07/enhancements-to-cfdocument-in-coldfusion-8/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New File I/O in ColdFusion 8 &#8211; Part II</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/07/new-file-io-in-coldfusion-8-part-ii/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2007/07/new-file-io-in-coldfusion-8-part-ii/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 16:22:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/07/17/new-file-io-in-coldfusion-8-part-ii/</guid>
		<description><![CDATA[In my previous post I talked about how new file I/O functions address working with large files. In this post I will talk about other file functions that have been added in ColdFusion 8. Most of these functions are equivalent to the cffile operations and we have retained the same behaviour as cffile. A side [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://coldfused.blogspot.com/2007/07/new-file-io-in-coldfusion-8.html">previous post</a> I talked about how new file I/O functions address working with large files. In this post I will talk about other file functions that have been added in ColdFusion 8. Most of these functions are equivalent to the cffile operations and we have retained the same behaviour as cffile. A side effect of that is &#8211; relative paths used in these functions are relative to the temp directory. I don&#8217;t really like that and I believe that it should have been relative to the template. But since these functions were supposed to replicate cffile behaviour, we had to live with it. <img src='http://www.rupeshk.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Here we go with the list of those new functions</p>
<p><span style="font-weight:bold;">FileRead(filepath, [charset])</span> &#8211; Similar to cffile, this function reads the entire content of a text file and returns the read content. you can also opitonally pass the charset to be used to read the text file.</p>
<p><span style="font-weight:bold;">FileReadBinary(filepath)</span> &#8211; This reads the entire content of a binary file and returns the byte array.</p>
<p><span style="font-weight:bold;">FileWrite(filepath, textdata | binarydata, [charset])</span> &#8211; Writes the specified content to the file. The content can be binary as well as text. If the specified content is a text data, you can optionally specify the charset so that the data can be written properly to the file.</p>
<p><span style="font-weight:bold;">FileCopy(source, destination)</span> &#8211; As the name suggests, it copies the source file to destination file. Similar to cffile, if the destination is a directory, then source will be copied to that directory otherwise source file will be copied to the destination file.</p>
<p><span style="font-weight:bold;">FileMove(source, destination)</span> &#8211; Moves the file from source to destination. Here again, if the destination is a directory, then source is moved under destination directory. Otherwise source is renamed to the destination.</p>
<p><span style="font-weight:bold;">FileDelete(filepath)</span> &#8211; Deletes the specified file. The only important thing to note here is that if the file is readOnly, it will not be deleted.</p>
<p><span style="font-weight:bold;">FileSetAttribute(filepath, attribute)</span> &#8211; Sets the attributes on file. Applies to Windows. &#8216;attribute&#8217; here is a comma-delimited list of attributes to set on the file. Possible attribute values are &#8220;readOnly&#8221; | &#8220;hidden&#8221; | &#8220;normal&#8221;.</p>
<p><span style="font-weight:bold;">FileSetAccessMode(filepath, mode)</span> &#8211; Sets the file access mode for Unix or Linux systems where the mode is octal values of UNIX chmod command assigned to owner, group, and other, respectively. To give full permission to everyone for a file, the mode should be 777.</p>
<p><b>GetFileInfo(filepath)</b> &#8211; So far till ColdFusion 7, there was no good way to find information like size, last modified date etc about a file. Only way you could do that was to use cfdirectory tag to list the directory, get the query from it, loop over the query until you hit the desired file and then fetch the required metadata. The new function GetFileInfo in ColdFusion 8 provides an easy way to get all the meta-data about a file or directory. This returns a struct which is described below.
<ul>
<li><b>name</b> &#8211; Name of the file/directory specified. This is just the file name and not the absolute path.</li>
<li><b>path</b> &#8211; Full path of the file/directory.</li>
<li><b>parent</b> &#8211; Full path of the parent directory.</li>
<li><b>type</b> &#8211; &#8220;directory&#8221; if the filepath is a directory else &#8220;file&#8221;.</li>
<li><b>size</b> &#8211; size of the file in bytes.</li>
<li><b>lastmodified</b> &#8211; DateTime at which this file/directory was last modified.</li>
<li><b>canRead</b> &#8211; &#8220;true&#8221; if this file/directory has &#8216;read&#8217; permission.  &#8220;false&#8221; Otherwise.</li>
<li><b>canWrite</b> &#8211; &#8220;true&#8221; if this file/directory has &#8216;write&#8217; permission. &#8220;false&#8221; Otherwise.</li>
<li><b>isHidden</b> &#8211; &#8220;true&#8221; if this file/directory is hidden. &#8220;false&#8221; Otherwise.</li>
<p></ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2007/07/new-file-io-in-coldfusion-8-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Few more details on File handle</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/07/few-more-details-on-file-handle/</link>
		<comments>http://www.rupeshk.org/blog/index.php/2007/07/few-more-details-on-file-handle/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 20:49:00 +0000</pubDate>
		<dc:creator>Rupesh Kumar</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/07/11/few-more-details-on-file-handle/</guid>
		<description><![CDATA[In my previous post I talked about file object that you get on FileOpen() which is nothing but handle to the native file. Did you ever try to dump this object? This file object provides lot of valuable information. If I run this code below

&#60;cfset myfile = FileOpen&#40;&#34;C:\cfunited_notes.txt&#34;&#41;&#62;
&#60;cfdump var=&#34;#myfile#&#34;&#62;
&#60;cfloop condition=&#34;Not FileIsEOF(myfile)&#34;&#62;
    &#60;cfset [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.rupeshk.org/blog/index.php/2007/07/new-file-io-in-coldfusion-8.html">previous post</a> I talked about file object that you get on FileOpen() which is nothing but handle to the native file. Did you ever try to dump this object? This file object provides lot of valuable information. If I run this code below</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> myfile <span style="color: #0000FF;">=</span> <span style="color: #800080; font-weight: bold;">FileOpen</span><span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;C:<span style="color: #009900;">\c</span>funited_notes.txt&quot;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfdump</span> <span style="color: #0000ff;">var</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#myfile#&quot;</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> condition<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Not FileIsEOF(myfile)&quot;</span><span style="color: #0000FF;">&gt;</span></span>
    <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> line <span style="color: #0000FF;">=</span> <span style="color: #800080; font-weight: bold;">FileReadLine</span><span style="color: #0000FF;">&#40;</span>myfile<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
    <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#line#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;&lt;</span><span style="color: #000000;">br</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #800080; font-weight: bold;">FileClose</span><span style="color: #0000FF;">&#40;</span>myfile<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>this is what gets dumped.</p>
<p><img style="float:left;cursor:pointer;margin:0 10px 10px 0;" src="http://3.bp.blogspot.com/_bIpyKqHMpHg/RpVHj8yYxYI/AAAAAAAAAAU/JBHSGX0uJNU/s320/filedump.jpg" alt="" border="0" />As you can see, it gives you information like lastmodified time, mode in which the file was opened, name, path, size in bytes and status of this file object whether this is still open or closed.</p>
<p>This object acts very much like a struct. So you can access these data from the file object using the simple dot notation. For example, to find out the last modified time, you can use fileObj.lastmodified</p>
<p>That gives another useful tool in your hand. While you are writing a file incrementally, you can easily find out the size of the file written so far using fileObj.size. This will be very helpful if you want to build a logging application where log files are rotated. While you are logging the data, as soon as the file size becomes more than your certain limit, you can close the file object and start writing to a new log file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rupeshk.org/blog/index.php/2007/07/few-more-details-on-file-handle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

