<?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>iphone and gis development notes &#187; coldfusion</title>
	<atom:link href="http:///wordpress/category/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>/wordpress</link>
	<description>By Rupert</description>
	<lastBuildDate>Sun, 29 Aug 2010 22:44:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>ColdFusion: Specifying -Dfile.encoding</title>
		<link>/wordpress/2008/09/coldfusion-specifying-dfileencoding/</link>
		<comments>/wordpress/2008/09/coldfusion-specifying-dfileencoding/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 06:06:13 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[SMS]]></category>

		<guid isPermaLink="false">/wordpress/?p=262</guid>
		<description><![CDATA[I have a small project to use a jar file for sending/receiving SMS in chinese. I could send the SMS fine from Eclipse, so I thought creating a Java Class wrapper to be used by ColdFusion so it can be called from HTTP could do the trick. After a few minutes, I have the class]]></description>
			<content:encoded><![CDATA[<p>I have a small project to use a jar file for sending/receiving SMS in chinese. I could send the SMS fine from Eclipse, so I thought creating a Java Class wrapper to be used by ColdFusion so it can be called from HTTP could do the trick.</p>
<p>After a few minutes, I have the class up and running and fully tested within Eclipse. </p>
<p>1. I dropped the class, dll and its jar in C:\ColdFusion8\lib. Take note its a Windows box, since the Jar is using a dll to talk to the Wavecom modem using AT commands.</p>
<p>GSMModem.jar<br />
GSMMultiPort.dll<br />
GSMMultiPortForJ.dll</p>
<p>2. The crux was to specify the file.encoding for Java as an argument from the CFIDE Administrator. After specifying GB18030, a quick restart.. voila.. </p>
<pre>
Java Version  	 1.6.0_01
Java Vendor 	Sun Microsystems Inc.
Java Vendor URL 	http://java.sun.com/
Java Home 	C:\ColdFusion8\runtime\jre
Java File Encoding 	GB18030
Java Default Locale 	en_US
File Separator 	\
Path Separator 	;
Line Separator 	Chr(13)
User Name 	SYSTEM
User Home 	C:\
</pre>
<p>Files:<br />
<a href="/wordpress/wp-content/uploads/2008/09/cfsendjava.txt" title="CFSend.java.txt">CFSend.java</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/09/coldfusion-specifying-dfileencoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing ColdFusion8 on Tomcat6</title>
		<link>/wordpress/2008/06/installing-coldfusion8-on-tomcat6/</link>
		<comments>/wordpress/2008/06/installing-coldfusion8-on-tomcat6/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 00:13:17 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">/wordpress/index.php/2008/06/07/installing-coldfusion8-on-tomcat6/</guid>
		<description><![CDATA[Tomcat Install: http://neilang.com/entries/how-to-install-tomcat-on-mac-os-x/ 1. download tomcat http://tomcat.apache.org/ 2. By default, MacOSX already has java in /Library/Java/Home 3. extract apache-tomcat-6.0.16.tar.gz 4. mv apache-tomcat-6.0.16 /usr/local/tomcat 5. cd /Library/StartupItems 6. sudo mkdir Tomcat 7. sudo vim tomcat Deploying coldfusion as a war http://www.adobe.com/support/coldfusion/j2ee/cfmx7j2ee_tomcat_deploy.html 8. When prompeted: Select J2EE configuration/WAR file 9. Copy cfusion.war to /usr/local/tomcat/webapps/ It should be]]></description>
			<content:encoded><![CDATA[<p><strong>Tomcat Install:</strong><br />
<a href="http://neilang.com/entries/how-to-install-tomcat-on-mac-os-x/">http://neilang.com/entries/how-to-install-tomcat-on-mac-os-x/</a></p>
<p>1. download tomcat http://tomcat.apache.org/</p>
<p>2. By default, MacOSX already has java in /Library/Java/Home</p>
<p>3. extract apache-tomcat-6.0.16.tar.gz</p>
<p>4. mv apache-tomcat-6.0.16 /usr/local/tomcat</p>
<p>5. cd /Library/StartupItems</p>
<p>6. sudo mkdir Tomcat</p>
<p>7. sudo vim tomcat</p>
<p><strong>Deploying coldfusion as a war<br />
<a href="http://www.adobe.com/support/coldfusion/j2ee/cfmx7j2ee_tomcat_deploy.html"><span style="font-weight: normal;">http://www.adobe.com/support/coldfusion/j2ee/cfmx7j2ee_tomcat_deploy.html</span></a></strong></p>
<p>8. When prompeted: Select J2EE configuration/WAR file</p>
<p>9. Copy cfusion.war to /usr/local/tomcat/webapps/</p>
<p>It should be automatically deployed, if not, then stop start tomcat</p>
<p>10. move tools.jar tools.old</p>
<p>11. Download the jce security and replace the files from your jdk directory</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/06/installing-coldfusion8-on-tomcat6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post Install Apache2.x, ColdFusion 8</title>
		<link>/wordpress/2008/05/post-install-apache2x-coldfusion-8/</link>
		<comments>/wordpress/2008/05/post-install-apache2x-coldfusion-8/#comments</comments>
		<pubDate>Wed, 28 May 2008 15:42:37 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">/wordpress/index.php/2008/05/28/post-install-apache2x-coldfusion-8/</guid>
		<description><![CDATA[After binding Apache2.x and ColdFusion 8, I find it very useful to follow the post-install instructions below: 1. Copying ColdFusion Admin directory to /wwwroot (webroot) # ln -s /var/www /wwwroot # cp -Rf /opt/coldfusion8/wwwroot/CFIDE /wwwroot/ # rm /wwwroot/index.html # cd /wwwroot # ln -s CFIDE cfide 2. Adding index.cfm to DirectoryIndex. # vim /etc/apache2/mods-available/dir.conf DirectoryIndex]]></description>
			<content:encoded><![CDATA[<p>After binding Apache2.x and ColdFusion 8, I find it very useful to follow the post-install instructions below:</p>
<p>1. Copying ColdFusion Admin directory to /wwwroot (webroot)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ln -s /var/www /wwwroot</span>
<span style="color: #666666; font-style: italic;"># cp -Rf /opt/coldfusion8/wwwroot/CFIDE /wwwroot/</span>
<span style="color: #666666; font-style: italic;"># rm /wwwroot/index.html</span>
<span style="color: #666666; font-style: italic;"># cd /wwwroot</span>
<span style="color: #666666; font-style: italic;"># ln -s CFIDE cfide</span></pre></div></div>

<p>2. Adding index.cfm to DirectoryIndex.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vim /etc/apache2/mods-available/dir.conf</span>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm index.cfm</pre></div></div>

<p>3. Restart apache</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 stop 
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 start</pre></div></div>

<p>4. Browse Admin page for the first time</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/05/post-install-apache2x-coldfusion-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Apache2.2 ColdFusion8 on Mac OS X Leopard</title>
		<link>/wordpress/2008/05/installing-apache22-coldfusion8-on-mac-os-x-leopard/</link>
		<comments>/wordpress/2008/05/installing-apache22-coldfusion8-on-mac-os-x-leopard/#comments</comments>
		<pubDate>Wed, 07 May 2008 00:54:21 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[leopard]]></category>

		<guid isPermaLink="false">/wordpress/?p=174</guid>
		<description><![CDATA[Ok so this post is a bit late as I saw it in my drafts, but better late than never. I did these even before I wrote the PostGres8.3/Postgis/pgRouting post. 1. Apache reference: http://httpd.apache.org/ ./configure &#8211;prefix=/usr/local/apache2 &#8211;with-m2m=prefork make sudo make install - To start on boot, download apache2startup.tar.gz and extract to your /Library/StartupItems/ 2. ColdFusion]]></description>
			<content:encoded><![CDATA[<p>Ok so this post is a bit late as I saw it in my drafts, but better late than never. I did these even before I wrote the <a href="/wordpress/index.php/2008/05/01/installing-postgres83-postgis133-pgrouting-on-macosx-leopard/">PostGres8.3/Postgis/pgRouting post.</a></p>
<p>1. Apache<br />
reference: http://httpd.apache.org/</p>
<p>./configure &#8211;prefix=/usr/local/apache2 &#8211;with-m2m=prefork<br />
make<br />
sudo make install</p>
<p>- To start on boot, download <a href="http://www.gisnotes.com/wordpress/wp-content/uploads/2008/05/apache2startuptar.gz">apache2startup.tar.gz</a> and extract to your /Library/StartupItems/</p>
<p>2. ColdFusion<br />
- run the installer as you would normally do in any windows/linux installation. I would suggest you put your installation in /opt and not ~ (home) because Leopard might wipe it out when upgrading to a higher OS version.<br />
- should automatically start on boot<br />
- bind coldfusion to apache</p>
<p>- Just in case you need to start it on boot, download <a href='/wordpress/wp-content/uploads/2008/05/coldfusion8tar.gz'>coldfusion8Startup.tar.gz</a></p>
<p>3. Installing mod_python on Apache<br />
$ ./configure &#8211;with-apxs=/usr/local/apache2/bin/apxs<br />
$ make<br />
$ sudo make install</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/05/installing-apache22-coldfusion8-on-mac-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test Driven Development using Test.AnotherWay and mxUnit</title>
		<link>/wordpress/2008/03/test-driven-development-using-testanotherway-and-mxunit/</link>
		<comments>/wordpress/2008/03/test-driven-development-using-testanotherway-and-mxunit/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 21:09:13 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.gisnotes.com/wordpress/index.php/2008/03/20/test-driven-development-using-testanotherway-and-mxunit/</guid>
		<description><![CDATA[Time and time again, I have debugging bugs and redeveloping code which some I wrote but mostly done by others as well. Experience is still my best teacher in web development and I believe it would be a heavier burden later on if we continuously pursue rapid development without any testing at all. You may]]></description>
			<content:encoded><![CDATA[<p>Time and time again, I have debugging bugs and redeveloping code which some I wrote but mostly done by others as well. Experience is still my best teacher in web development and I believe it would be a heavier burden later on if we continuously pursue rapid development without any testing at all.</p>
<p>You may have heard of writing test cases before diving into code which is well known as Test Driven Development.  This methodology has been widely adapted in programming (Java thru JUnit, etc).  Following Kent Beck&#8217;s Test Driven Development (TDD) we will follow this simple method:</p>
<ol>
<li>Write the test <em>first</em></li>
<li>Watch the test fail</li>
<li>Write the component</li>
<li>Watch the test pass</li>
</ol>
<p><span id="more-155"></span><br />
A. <a href="http://straytree.com/TestAnotherWay/doc/index.html">Test.AnotherWay.</a> With the emerging trend in web development including javascript, I need a similar aproach which makes development consistent and debugging easier for the client/front-end.  Since I&#8217;ve been doing mostly web mapping, I have adapted a testing methodology from OpenLayers which is practical but effective.</p>
<p>1. Read <a href="http://straytree.com/TestAnotherWay/doc/index.html">Test.AnotherWay Documentation</a></p>
<p>2. Download <a href="http://straytree.com/TestAnotherWay/download/Test.AnotherWay-0.51.tar.gz">Test.AnotherWay-0.51.tar.gz</a></p>
<p>3. Let&#8217;s say my application is called <strong>myproject</strong>. Create a <em>test</em> folder under <strong>myproject</strong>.</p>
<p>4. Copy run-tests.html, list-tests.html into <strong>myproject</strong>/<em>test</em>. Don&#8217;t be surprised if you can&#8217;t find list-tests.html in Test.AnotherWay.</p>
<p>5. Writing the tests. To add a test, you should add it on <strong>list-tests.html</strong>. Test files should be named beginning with test_. For example, <em>test_index.html<br />
</em></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #003366; font-weight: bold;">function</span> test_Map<span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        t.<span style="color: #660066;">plan</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">//this should go to the Application\\'s Global Settings</span>
    	<span style="color: #003366; font-weight: bold;">var</span> baselayer <span style="color: #339933;">=</span> CS.<span style="color: #660066;">globals</span>.<span style="color: #660066;">baselayer</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">//this should go to the Application\\'s Global Settings</span>
		<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> CS.<span style="color: #660066;">globals</span>.<span style="color: #660066;">options</span><span style="color: #339933;">;</span>		
&nbsp;
		map <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CS.<span style="color: #660066;">Map</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div-map&quot;</span><span style="color: #339933;">,</span> baselayer<span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #006600; font-style: italic;">// default options was set</span>
		t.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>map.<span style="color: #660066;">getMap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">CLASS_NAME</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;OpenLayers.Map&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;map object created successful&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		layerPlaces <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CS.<span style="color: #660066;">VectorLayer</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Places Layer&quot;</span><span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		t.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>layerPlaces.<span style="color: #660066;">getLayer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">CLASS_NAME</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;OpenLayers.Layer.Vector&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;vector layer created successfully&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		map.<span style="color: #660066;">addVectorLayer</span><span style="color: #009900;">&#40;</span>layerPlaces<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		selectControl <span style="color: #339933;">=</span> layerPlaces.<span style="color: #660066;">getSelectControl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		t.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>selectControl.<span style="color: #660066;">CLASS_NAME</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;OpenLayers.Control.SelectFeature&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;selectFeatureControl added successfully&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>B. For the server side, particularly ColdFusion, I have been using <a href="http://mxunit.org/doc/index.cfm">mxunit.org</a> upon following <a href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/MXUnit">Sean Corfield&#8217;s blog post regarding ColdFusion Unit Testing.</a></p>
<p>1. Download from <a href="mxunit.org">mxunit.org</a></p>
<p>2. Extract to your webroot</p>
<p>3. Write your testcase as a cfc.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> metaName <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;gao li wu&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> search <span style="color: #339933;">=</span> createObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;component&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;platform.svc.search.GeoSearch&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
search.<span style="color: #660066;">setDSN</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'beijing_app'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
search.<span style="color: #660066;">setMetaName</span><span style="color: #009900;">&#40;</span>metaName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
actual <span style="color: #339933;">=</span> search.<span style="color: #660066;">getMetaName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
assertEquals<span style="color: #009900;">&#40;</span>actual<span style="color: #339933;">,</span>metaName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Notes:<br />
1. You can <strong>show the cfdump on the test case iff the test-case passed</strong>. If your test-case <em>fails</em>, then you need to <strong>comment</strong> the assertion first so you could see the cfdump. Inserting cfdump (commented or not) is a convenient way to debug your CFM.</p>
<p>2. You can chain test cases by calling the related functions. This is very useful when you are doing a short-circuit test.</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/03/test-driven-development-using-testanotherway-and-mxunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making GeoJSON outputs from PostGIS</title>
		<link>/wordpress/2008/02/making-geojson-outputs-from-postgis/</link>
		<comments>/wordpress/2008/02/making-geojson-outputs-from-postgis/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 02:08:17 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[GeoJSON]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[postgis]]></category>

		<guid isPermaLink="false">/wordpress/index.php/2008/02/23/making-geojson-outputs-from-postgis/</guid>
		<description><![CDATA[I have an internet/web application sitting on top of OpenLayers, ExtJS, ColdFusion and PostGreSQL/PostGIS. I can query the geometry from PostGIS thru ColdFusion without any problems. If you are in ColdFusion 7, then you need a postgresql driver installed, but I do suggest you use ColdFusion 8 as the driver is built-in. To display the]]></description>
			<content:encoded><![CDATA[<p>I have an internet/web application sitting on top of OpenLayers, ExtJS, ColdFusion and PostGreSQL/PostGIS. I can query the geometry from PostGIS thru ColdFusion without any problems. If you are in ColdFusion 7, then you need a postgresql driver installed, but I do suggest you use ColdFusion 8 as the driver is built-in.</p>
<p>To display the geometry, I typically use AsGML output from PostGIS and supply that path to OpenLayers. Although it works as expected, I need to invest in two (2) http calls to the server:</p>
<ul>
<li>1st Request: Call search.cfm and get the attributes (name, address, tel_no, etc&#8230;). Afterwards, display the results on an Ext.Window.</li>
<li>2nd Request: Display the geometries on OpenLayers using GML.</li>
</ul>
<p><span id="more-145"></span>We have decided in our organisation not to write out the javascript statements on AJAX calls but instead retrieve them as Data Objects (either XML or GeoJSON). Putting in javascript statements on AJAX calls seems harder to debug. GeoJSON is highly preferred for internet mapping applications since it has a unique ability to see the javascript objects quickly on the browser, making debugging easier.</p>
<p>I wrote a simple cfc below to be able to parse the geometry from PostGIS using AsText(geometry).  The function accepts a geometry as string and returns a structure containing the type and the coordinates.</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;">cfcomponent</span> displayname<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;GeoJSON&quot;</span> <span style="color: #0000FF;">hint</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;I am a GeoJSON Component. I parse a geometry and return it as JSON&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;init&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&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;">cfreturn</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;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>	
&nbsp;
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;format&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Struct&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&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;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;geomtext&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;String&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&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><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: #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: #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: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> geometry<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;StructNew()&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><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: #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: #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: #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: #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: #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: #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: #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: #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: #0000FF;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfset</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> geometry.<span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Mid(arguments.geomtext,&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><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: #0000FF;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfset</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> geomreplacedbrackets<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Replace(arguments.geomtext,&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><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> geomreplacedbrackets<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Replace(geomReplacedBrackets,&quot;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">from</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span> <span style="color: #0000FF;">to</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#Len(geomReplacedBrackets)#&quot;</span> <span style="color: #0000FF;">index</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;i&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> curchar<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Mid(geomReplacedBrackets,&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;">cfif</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> geometry.coordinates<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;geometry.coordinates&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><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> secchar<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Mid(geomReplacedBrackets,&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;">cfif</span><span style="color: #0000FF;">&gt;</span></span> <span style="color: #808080; font-style: italic;">&lt;!--- Get the next character from the current position and see if its numeric ---&gt;</span>
					<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> posi<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;i&quot;</span><span style="color: #0000FF;">&gt;</span></span> <span style="color: #808080; font-style: italic;">&lt;!--- Get the position of &quot;[&quot;---&gt;</span>
					<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfset</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> posj<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;find(']',&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><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> tempgeom<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Mid(geomReplacedBrackets,&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><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> i<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;posJ&quot;</span><span style="color: #0000FF;">&gt;</span></span> <span style="color: #808080; font-style: italic;">&lt;!--- reinitialize i ---&gt;</span>
&nbsp;
					<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfset</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: #0000FF;">&gt;</span></span>
&nbsp;
					<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">list</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#tempGeom#&quot;</span> <span style="color: #0000FF;">index</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;tempGeomIndex&quot;</span> delimiters<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;,&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> tempvalue<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;[&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><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> geomreplaced<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;ListAppend(geomReplaced,&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><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: #0000FF;">&gt;</span></span>
&nbsp;
					<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> geometry.coordinates<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;geometry.coordinates&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><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</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: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</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: #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;">cfelseif</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> geometry.coordinates<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;geometry.coordinates&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><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfelseif</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: #0000FF;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> geometry.coordinates<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Replace(geometry.coordinates,&quot;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</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> geometry.coordinates<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Replace(geometry.coordinates,&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><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> geometry.coordinates<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Replace(geometry.coordinates,&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><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfreturn</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;">cfreturn</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;">cfif</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: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfargument</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;">cffunction</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;">cfcomponent</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/02/making-geojson-outputs-from-postgis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reviving an old web map with Google Maps via OpenLayers</title>
		<link>/wordpress/2008/01/reviving-an-old-web-map-with-google-maps-via-openlayers/</link>
		<comments>/wordpress/2008/01/reviving-an-old-web-map-with-google-maps-via-openlayers/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 01:10:09 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[openlayers]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">/wordpress/?p=136</guid>
		<description><![CDATA[An old coworker and I worked on a travel portal for the Philippines called travelsite.ph about 4 years ago. We are now given a task of reviving the old web application and even adding mapping functionalities. Back then, the application was using ColdFusion 4.5 and MySQL 3. Fingers crossed we dropped the app in a]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gisnotes.com/wordpress/wp-content/uploads/2008/01/travelsite.jpg" title="Travelsite.ph with Google"><img src="http://www.gisnotes.com/wordpress/wp-content/uploads/2008/01/travelsite.jpg" alt="Travelsite.ph with Google" /></a></p>
<p>An old coworker and I worked on a travel portal for the Philippines called travelsite.ph about 4 years ago. We are now given a task of reviving the old web application and even adding mapping functionalities.  Back then, the application was using ColdFusion 4.5 and MySQL 3.</p>
<p>Fingers crossed we dropped the app in a ColdFusion 6/7/8 environment with no changes at all. The app still works! Awesome.. how CF really progressed through the years with backward compatibility.  The only changes we made was removing the registration/sign up for a quick demo. I just laughed at the oddities and the no brainer features (pertaining to security) that I made when I was starting out.</p>
<p>The database was also intact and have UTM coordinates. We dropped it to a Debian mysql 5 and works flawlessly since its MyISAM. I had the coordinates exported to lon/lat, so I could directly inject it to OpenLayers/Google.  After two hours of fiddling around, I got mapping embedded.. hehe.. courtesy of OpenLayers ofcourse.</p>
<p>Here&#8217;s a quick reminder to myself&#8230;</p>
<p>A. Google WGS 84 Example.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
					projection<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;EPSG:4326&quot;</span><span style="color: #339933;">,</span>
					numZoomLevels<span style="color: #339933;">:</span> <span style="color: #CC0000;">19</span><span style="color: #339933;">,</span>
					maxExtent<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Bounds</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">120.8774</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">14.3684</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">121.1628</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">14.7931</span><span style="color: #009900;">&#41;</span>
&nbsp;
				<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// avoid pink tiles</span>
		OpenLayers.<span style="color: #660066;">IMAGE_RELOAD_ATTEMPTS</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">;</span>
		OpenLayers.<span style="color: #660066;">Util</span>.<span style="color: #660066;">onImageLoadErrorColor</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;transparent&quot;</span><span style="color: #339933;">;</span>
		map <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Map</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mapdiv'</span><span style="color: #339933;">,</span>options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		sat_wms <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Layer</span>.<span style="color: #660066;">Google</span><span style="color: #009900;">&#40;</span>
					<span style="color: #3366CC;">&quot;Layer&quot;</span><span style="color: #339933;">,</span>
					<span style="color: #009900;">&#123;</span>type<span style="color: #339933;">:</span> G_SATELLITE_MAP<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		map.<span style="color: #660066;">addLayer</span><span style="color: #009900;">&#40;</span>sat_wms<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		map.<span style="color: #660066;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Control</span>.<span style="color: #660066;">MousePosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		map.<span style="color: #660066;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Control</span>.<span style="color: #660066;">LayerSwitcher</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		map.<span style="color: #660066;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Control</span>.<span style="color: #660066;">Scale</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> center <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">LonLat</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">121.06504</span><span style="color: #339933;">,</span><span style="color: #CC0000;">14.65495</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		map.<span style="color: #660066;">setCenter</span><span style="color: #009900;">&#40;</span>center<span style="color: #339933;">,</span> <span style="color: #CC0000;">16</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>B. Google Mercator Projection</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">		window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
						projection<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;EPSG:900913&quot;</span><span style="color: #339933;">,</span>
						units<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;m&quot;</span><span style="color: #339933;">,</span>
						maxResolution<span style="color: #339933;">:</span> <span style="color: #CC0000;">156543.0339</span><span style="color: #339933;">,</span>
						numZoomLevels<span style="color: #339933;">:</span> <span style="color: #CC0000;">19</span><span style="color: #339933;">,</span>
						maxExtent<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Bounds</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">12823075.86334</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">4800551.12375</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">13101918.14248</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">5021301.26141</span><span style="color: #009900;">&#41;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// avoid pink tiles</span>
			OpenLayers.<span style="color: #660066;">IMAGE_RELOAD_ATTEMPTS</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">;</span>
			OpenLayers.<span style="color: #660066;">Util</span>.<span style="color: #660066;">onImageLoadErrorColor</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;transparent&quot;</span><span style="color: #339933;">;</span>
			map <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Map</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mapdiv'</span><span style="color: #339933;">,</span>options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			sat_wms <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Layer</span>.<span style="color: #660066;">Google</span><span style="color: #009900;">&#40;</span>
						<span style="color: #3366CC;">&quot;Layer&quot;</span><span style="color: #339933;">,</span>
						<span style="color: #009900;">&#123;</span>type<span style="color: #339933;">:</span> G_SATELLITE_MAP<span style="color: #339933;">,</span><span style="color: #3366CC;">'sphericalMercator'</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			map.<span style="color: #660066;">addLayer</span><span style="color: #009900;">&#40;</span>sat_wms<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// start custom layer here</span>
			<span style="color: #003366; font-weight: bold;">var</span> layer_obj <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Layer</span>.<span style="color: #660066;">WMS</span><span style="color: #009900;">&#40;</span>
				<span style="color: #3366CC;">&quot;Beijing&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #3366CC;">&quot;http://127.0.0.1/cgi-bin/mapserv&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #009900;">&#123;</span>
					layers<span style="color: #339933;">:</span> <span style="color: #3366CC;">'beijing_all'</span><span style="color: #339933;">,</span>
					map<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/home/map/beijing/new/beijing_google.map'</span><span style="color: #339933;">,</span>
					format<span style="color: #339933;">:</span> <span style="color: #3366CC;">'AGG'</span><span style="color: #339933;">,</span>
					<span style="color: #3366CC;">'transparent'</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'true'</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			layer_obj.<span style="color: #660066;">setIsBaseLayer</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			layer_obj.<span style="color: #660066;">setVisibility</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
			map.<span style="color: #660066;">addLayer</span><span style="color: #009900;">&#40;</span>layer_obj<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			map.<span style="color: #660066;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Control</span>.<span style="color: #660066;">MousePosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			map.<span style="color: #660066;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Control</span>.<span style="color: #660066;">LayerSwitcher</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			map.<span style="color: #660066;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Control</span>.<span style="color: #660066;">Scale</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> center <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">LonLat</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">12956625.68367</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">4852316.90682</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			map.<span style="color: #660066;">setCenter</span><span style="color: #009900;">&#40;</span>center<span style="color: #339933;">,</span> <span style="color: #CC0000;">18</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span></pre></div></div>

<p>What&#8217;s the difference between both snippets? Obviously projection is one. Since most of my point data is in lon/lat, then the WGS84 example is good if I don&#8217;t want to overlay custom precise data.  Remember the x shift problem in Google with Openlayers. The Google Mercator example is used when I want to overlay more custom data, particularly polygons/line that needs to fit on Google Layers. For more details, please see my previous <a href="/wordpress/?p=129">blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/01/reviving-an-old-web-map-with-google-maps-via-openlayers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion CheatSheet</title>
		<link>/wordpress/2008/01/coldfusion-cheatsheet/</link>
		<comments>/wordpress/2008/01/coldfusion-cheatsheet/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 16:12:19 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">/wordpress/?p=133</guid>
		<description><![CDATA[There are many coldfusion programming techniques that I always grep/search in my applications. It is time to put them all in one place. 1. How to set different alternating row colors?]]></description>
			<content:encoded><![CDATA[<p>There are many coldfusion programming techniques that I always grep/search in my applications. It is time to put them all in one place.</p>
<p><strong>1. How to set different alternating row colors?</strong><br />
<code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/01/coldfusion-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to ColdFusion8</title>
		<link>/wordpress/2007/08/upgrading-to-coldfusion8/</link>
		<comments>/wordpress/2007/08/upgrading-to-coldfusion8/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 20:32:52 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">/wordpress/?p=100</guid>
		<description><![CDATA[I had the liberty of upgrading to ColdFusion 8. Works smoothly&#8230; Install took some time. Memory peaks instantly at 250M Binding to Apache2.2 was seamless. No need to use the updated wsconfig.jar New ColdFusion Administrator. Debugging looks promising&#8230;]]></description>
			<content:encoded><![CDATA[<p>I had the liberty of upgrading to ColdFusion 8. Works smoothly&#8230;</p>
<ul>
<li>Install took some time.</li>
<li>Memory peaks instantly at 250M</li>
<li>Binding to Apache2.2 was seamless. No need to use the updated wsconfig.jar</li>
<li>New ColdFusion Administrator. Debugging looks promising&#8230;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/08/upgrading-to-coldfusion8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internationalisation i18n development</title>
		<link>/wordpress/2007/08/internationalisation-i18n-development/</link>
		<comments>/wordpress/2007/08/internationalisation-i18n-development/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 23:30:19 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">/wordpress/?p=93</guid>
		<description><![CDATA[In order to change the file.encoding of ColdFusion, you can do so in CFIDE Administrator. Go to Java &#38; JVM Settings and add &#8220;-Dfile.encoding=GB18030&#8243; in the JVM Arguments. The file.encoding were useful during my SMS Development experience. I noticed the file encoding of the java classes are in GB18030 (Chinese). Below is my previous post]]></description>
			<content:encoded><![CDATA[<p>In order to change the file.encoding of ColdFusion, you can do so in CFIDE Administrator.</p>
<p><a href="http://192.168.1.211/wordpress/wp-content/uploads/2008/10/picture-1.png"><img class="alignnone size-medium wp-image-267" title="picture-1" src="http://192.168.1.211/wordpress/wp-content/uploads/2008/10/picture-1-300x154.png" alt="" width="300" height="154" /></a></p>
<p>Go to Java &amp; JVM Settings and add &#8220;-Dfile.encoding=GB18030&#8243; in the JVM Arguments.</p>
<p><a href="http://192.168.1.211/wordpress/wp-content/uploads/2008/10/picture-2.png"><img class="alignnone size-medium wp-image-268" title="picture-2" src="http://192.168.1.211/wordpress/wp-content/uploads/2008/10/picture-2-300x43.png" alt="" width="300" height="43" /></a></p>
<p>The file.encoding were useful during my SMS Development experience. I noticed the file encoding of the java classes are in GB18030 (Chinese).</p>
<p>Below is my previous post regarding database access. In a nutshell, db access should be in UTF-8 for multilingual purposes..</p>
<blockquote><p>If your writing a global site, you&#8217;re better off using UTF-8. However, some chinese programmers has the habit of saving their files in GBK.  If it is the defacto standard for the chinese programmers, then integration would be difficult on my end. So, I have made this visual representation of file.encodings vs ColdFusion with respect to globalization.</p>
<p><img src="http://www.gisnotes.com/wordpress/wp-content/uploads/2007/08/i18n_dev.gif" alt="i18n_dev.gif" /></p>
<p>UTF-8 files would work in both UTF-8 / GBK based servers. However, files saved as GBK would only work in UTF-8 CF servers if the  is used.</p>
<p>On a side note, if you want to change your locale settings for ColdFusion, then you can read this technote.</p>
<p><a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19230&amp;sliceId=2">http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19230&amp;sliceId=2</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/08/internationalisation-i18n-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian Howto: Apache 2.2 + ColdFusion Updated for SID</title>
		<link>/wordpress/2007/08/debian-howto-apache-22-coldfusion/</link>
		<comments>/wordpress/2007/08/debian-howto-apache-22-coldfusion/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 20:51:54 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/wordpress/?p=84</guid>
		<description><![CDATA[Wow, this is really nice. I was able to install Apache2.2 + ColdFusion on my current Debian 4.0 Etch. Here&#8217;s an introduction on using apt&#8230; Use apt-cache to search the local database for available packages. apt-cache search [search terms] will find packages that sound like what you want and: apt-cache show [packagename] will return more]]></description>
			<content:encoded><![CDATA[<p>Wow, this is really nice. I was able to install Apache2.2 + ColdFusion on my current Debian 4.0 Etch.</p>
<p>Here&#8217;s an introduction on using apt&#8230;</p>
<blockquote><p> Use   apt-cache   to search the local database for available packages.<br />
apt-cache search [search terms]   will find packages that sound like what you want and:<br />
apt-cache show [packagename]   will return more details on a particular package.<br />
apt-cache showpkg [packagename]   will return more details on a particular package.<br />
apt-cache policy [packagename]   will return which versions are available along with the priority of each version.<br />
apt-setup   will enable you to change mirrors. The alternative is to edit   /etc/apt/sources.list   manually (which I prefer).<br />
apt-get clean clears the local repository of all retrieved package files.<br />
apt-get autoclean clears the local repository of retrieved package files of programs that are no longer installed.<br />
dpkg -l [packagename] will list the version and a short description of the package we have installed.</p></blockquote>
<p><strong>Installing Apache2.2</strong></p>
<p>1. <code>apt-get install g++</code></p>
<p>2. <code>apt-get install apache2</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Setting up apache2-utils <span style="color: #7a0874; font-weight: bold;">&#40;</span>2.2.3-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Setting up apache2.2-common <span style="color: #7a0874; font-weight: bold;">&#40;</span>2.2.3-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Setting Apache2 to Listen on port 80. If this is not desired, please edit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ports.conf <span style="color: #c20cb9; font-weight: bold;">as</span> desired. Note that the Port directive no longer works.
Module <span style="color: #7a0874; font-weight: bold;">alias</span> installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module autoindex installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module <span style="color: #c20cb9; font-weight: bold;">dir</span> installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module <span style="color: #c20cb9; font-weight: bold;">env</span> installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module mime installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module negotiation installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module setenvif installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module status installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module auth_basic installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module authz_default installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module authz_user installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module authz_groupfile installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module authn_file installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
Module authz_host installed; run <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload to enable.
&nbsp;
Setting up apache2-mpm-worker <span style="color: #7a0874; font-weight: bold;">&#40;</span>2.2.3-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Starting web server <span style="color: #7a0874; font-weight: bold;">&#40;</span>apache2<span style="color: #7a0874; font-weight: bold;">&#41;</span>...apache2: Could not reliably determine the server<span style="color: #ff0000;">'s fully qualified domain name, using 127.0.0.1 for ServerName</span></pre></div></div>

<p>3. <code>/etc/init.d/apache2 start</code></p>
<p>4. <code>ps -ef | grep apache2</code></p>
<p>5. Post Install:<br />
<code><br />
#mkdir -p /usr/local/apache2<br />
#ln -s /var/log/apache2 /usr/local/apache2/logs<br />
#ln -s /var/www 	/usr/local/apache2/htdocs<br />
#ln -s /usr/lib/cgi-bin /usr/local/apache2/cgi-bin<br />
</code></p>
<p><strong>Installing ColdFusion 8</strong><br />
1. Install ColdFusion 8 normally. Make the user as nobody</p>
<p>2. To start ColdFusion8 on boot, download this startup script (<a href='/wordpress/wp-content/uploads/2008/05/coldfusion8_startup_debian.sh'>coldfusion8_startup_debian</a>).<br />
  Drop it to /etc/init.d/ and start coldfusion</p>
<p>3. Bind ColdFusion to Apache. Modify the existing apache_connector.sh.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Configure the Apache connector.</span>
<span style="color: #666666; font-style: italic;">#       -dir should be the *directory* which contains httpd.conf</span>
<span style="color: #666666; font-style: italic;">#       -bin should be the path to the apache *executable*</span>
<span style="color: #666666; font-style: italic;">#       -script should be the path to the script which is used to</span>
<span style="color: #666666; font-style: italic;">#               start/stop apache</span>
<span style="color: #666666; font-style: italic;">#</span>
..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>runtime<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>wsconfig \
        <span style="color: #660033;">-server</span> coldfusion \
        <span style="color: #660033;">-ws</span> apache \
        <span style="color: #660033;">-dir</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2 \
        <span style="color: #660033;">-bin</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2 \
        <span style="color: #660033;">-script</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2ctl \
        <span style="color: #660033;">-coldfusion</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #007800;">$#</span></pre></div></div>

<p>4. Check if the bind is successful by inspecting /etc/apache2/httpd.conf . You should see something similar below&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># JRun Settings</span>
LoadModule jrun_module <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coldfusion8<span style="color: #000000; font-weight: bold;">/</span>runtime<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>wsconfig<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>mod_jrun22.so
<span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_jrun22.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    JRunConfig Verbose <span style="color: #c20cb9; font-weight: bold;">false</span>
    JRunConfig Apialloc <span style="color: #c20cb9; font-weight: bold;">false</span>
    JRunConfig Ignoresuffixmap <span style="color: #c20cb9; font-weight: bold;">false</span>
    JRunConfig Serverstore <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coldfusion8<span style="color: #000000; font-weight: bold;">/</span>runtime<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>wsconfig<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>jrunserver.store
    JRunConfig Bootstrap 127.0.0.1:<span style="color: #000000;">51011</span>
    <span style="color: #666666; font-style: italic;">#JRunConfig Errorurl url &lt;optionally redirect to this URL on errors&gt;</span>
    <span style="color: #666666; font-style: italic;">#JRunConfig ProxyRetryInterval 600 &lt;number of seconds to wait before trying to reconnect to unreachable clustered server&gt;</span>
    <span style="color: #666666; font-style: italic;">#JRunConfig ConnectTimeout 15 &lt;number of seconds to wait on a socket connect to a jrun server&gt;</span>
    <span style="color: #666666; font-style: italic;">#JRunConfig RecvTimeout 300 &lt;number of seconds to wait on a socket receive to a jrun server&gt;</span>
    <span style="color: #666666; font-style: italic;">#JRunConfig SendTimeout 15 &lt;number of seconds to wait on a socket send to a jrun server&gt;</span>
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>5. Follow Post install considerations</p>
<p><strong>Installing ColdFusion7.0.2</strong></p>
<p>References:<br />
<a href="http://demirkapi.net/tutorials/coldfusion_debian_installation.cfm">http://demirkapi.net/tutorials/coldfusion_debian_installation.cfm</a><br />
<a href="http://demirkapi.net/tutorials/coldfusion_debian_installation.cfm">http://www.easycfm.com/print/index.cfm?tutorial_id=376</a></p>
<p>1.<code> apt-get install libstdc++6 libstdc++5 libstdc++2.10-glibc2.2(etch)</code></p>
<p>On etch, by default there is already xlibs, if we have desktop. On sid, if there is also no X, we need to install <code>libxp6 libxt6 libxtst6</code>.  If you don&#8217;t install these libraries, you will get a graphing library error during coldfusionmx startup.</p>
<p>2. By default debian has a &#8216;nobody&#8217; user also</p>
<p>From <a href="http://forums.gentoo.org/viewtopic-t-312113.html">http://forums.gentoo.org/viewtopic-t-312113.html</a>, and <strong>if you get a libc.so.6 No suc file or directory found problem</strong></p>
<p>3. Modify /opt/coldfusionmx7/bin/coldfusion and comment out LD_ASSUME_KERNEL<br />
<code><br />
174                 # Some Java JVMs (both from Sun and IBM) don't work with the new floating stack<br />
175                 # feature of the i686 version of glibc.  Force glibc to use the deprecated stack model.<br />
176                 # Check if the OS is SuSE8.1 or SuSE 9 - if it is, do not use the deprecated stack model.<br />
177                 #SUSEFLAG=`grep 'SuSE Linux 8.1\|UnitedLinux 1.0\|SuSE Linux 9\|SUSE LINUX Enterprise Server 9' /etc/SuSE-release /etc/UnitedLinux-release /etc/UnitedLinux-release 2&gt; /dev/null`<br />
178<br />
179                 #if [ ! "$SUSEFLAG" ]; then<br />
180                 #       LD_ASSUME_KERNEL=2.2.9<br />
181                 #       export LD_ASSUME_KERNEL<br />
182                 #fi<br />
</code></p>
<p>4. <strong>Boot on Start.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#cp -Rf /opt/coldfusionmx7/bin/coldfusion /etc/init.d/coldfusionmx7</span>
<span style="color: #666666; font-style: italic;">#update-rc.d coldfusionmx7 start 80 2 3 4 5 . stop 15 0 1 6 .</span></pre></div></div>

<p>5. You need the latest wsconfig.jar that will work on Apache2.2. It was discussed from a technote <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=8001e97&amp;sliceId=2">here</a>. Configure apache with coldfusion<br />
<code><br />
</code></p>
<p>or</p>
<p>Call <strong>java</strong> and execute wsconfig.jar</p>
<p><code><br />
/opt/coldfusionmx7/runtime/jre/bin/java<br />
cd {cf_root}/runtime/lib</code></p>
<p>java -Dtrace.ci=1 -jar wsconfig.jar -server coldfusion -ws apache</p>
<p>-dir /etc/apache2/</p>
<p>-bin /usr/sbin/apache2</p>
<p>-script /usr/sbin/apache2ctl</p>
<p>-coldfusion -v</p>
<p>[-apxs]</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/08/debian-howto-apache-22-coldfusion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing CFMX7 on CentOS5</title>
		<link>/wordpress/2007/07/installing-cfmx7-on-centos5/</link>
		<comments>/wordpress/2007/07/installing-cfmx7-on-centos5/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 22:25:30 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">/wordpress/?p=76</guid>
		<description><![CDATA[1. You need to install libXpm beforehand to save time in the Graphing Service Error Problems. rpm -ivh libXpm-3.5.5-3.i386.rpm 2. Modify the installer. cat coldfusion-702-linux.bin.backup &#124; sed &#8220;s/export LD_ASSUME/#xport LD_ASSUME/&#8221; &#62; coldfusion-702-linux.bin Reference: http://www.billmitchell.org/coldfusion/centos5/mx7_apache.php POST-INSTALL 1. Disable Verity search if you don&#8217;t use it. chkconfig cfmx7search off]]></description>
			<content:encoded><![CDATA[<p>1. You need to install libXpm beforehand to save time in the Graphing Service Error Problems.</p>
<p><code><br />
rpm -ivh libXpm-3.5.5-3.i386.rpm<br />
</code></p>
<p>2. Modify the installer.<br />
cat coldfusion-702-linux.bin.backup | sed &#8220;s/export LD_ASSUME/#xport LD_ASSUME/&#8221; &gt; coldfusion-702-linux.bin</p>
<p><strong>Reference:</strong> <a href="http://www.billmitchell.org/coldfusion/centos5/mx7_apache.php">http://www.billmitchell.org/coldfusion/centos5/mx7_apache.php</a></p>
<p>POST-INSTALL</p>
<p>1. Disable Verity search if you don&#8217;t use it.<br />
<code><br />
chkconfig cfmx7search off<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/07/installing-cfmx7-on-centos5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CF-Postgres ODBC Connection</title>
		<link>/wordpress/2007/07/cf-postgres-odbc-connection/</link>
		<comments>/wordpress/2007/07/cf-postgres-odbc-connection/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 15:04:26 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">/wordpress/?p=75</guid>
		<description><![CDATA[Note: You need the postgresql-8.2-504.jdbc3.jar. Technote From Adobe]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gisnotes.com/wordpress/wp-content/uploads/2007/07/cf_postgres.png" title="CF-Postgres ODBC"><img src="http://www.gisnotes.com/wordpress/wp-content/uploads/2007/07/cf_postgres.png" alt="CF-Postgres ODBC" /></a></p>
<p>Note: You need the postgresql-8.2-504.jdbc3.jar.</p>
<p><a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18338&amp;sliceId=1">Technote From Adobe</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/07/cf-postgres-odbc-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion Threads, Memory, etc</title>
		<link>/wordpress/2007/06/coldfusion-threads-memory-etc/</link>
		<comments>/wordpress/2007/06/coldfusion-threads-memory-etc/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 13:26:08 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">/wordpress/?p=63</guid>
		<description><![CDATA[Why is there a lot of CF threads when i do a `ps`? From Adobe&#8217;s Technote.. Due to the way Linux handles processes, the kernel spawns several processes for each of the Java Virtual Machine (JVM or JRE) worker threads. Since ColdFusion MX is calling/controlling the JVM, these processes are owned by ColdFusion MX. It]]></description>
			<content:encoded><![CDATA[<p>Why is there a lot of CF threads when i do a `ps`?</p>
<blockquote><p> From Adobe&#8217;s Technote..<br />
Due to the way Linux handles processes, the kernel spawns several processes for each of the Java Virtual Machine (JVM or JRE) worker threads. Since ColdFusion MX is calling/controlling the JVM, these processes are owned by ColdFusion MX. It is normal, for example, to see 35 processes after ColdFusion MX startup using &#8216;pstree&#8217;. Under load, this number could be 100 or more.</p></blockquote>
<p>How do I completely monitor the memory usage of CF?</p>
<p><a href="http://www.petefreitag.com/item/115.cfm">Pete wrote a short cfm script to access the java memory.</a>. Here is the sample output:</p>
<p><code><br />
% of Free Allocated Memory: 14%<br />
% of Available Memory Allocated: 11%<br />
Free Allocated Memory: 15mb<br />
Total Memory Allocated: 107mb<br />
Max Memory Available to JVM: 986mb<br />
</code></p>
<p>Once the Total Memory reaches the Max Memory, then the jvm has allocated all of its allocateable memory. Here&#8217;s a <a href="http://222.128.19.19/top.cfm">demo.</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/06/coldfusion-threads-memory-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding and protecting CFM</title>
		<link>/wordpress/2007/06/hiding-and-protecting-cfm/</link>
		<comments>/wordpress/2007/06/hiding-and-protecting-cfm/#comments</comments>
		<pubDate>Fri, 08 Jun 2007 13:03:44 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/wordpress/?p=56</guid>
		<description><![CDATA[With recent client developments, I fiddled my way on how to protect IPR of my cfc/cfm source codes. Two tasks in mind was to hide the cfm extension from Apache and precompile the CF source files (cfm/cfc). Hiding the cfm extension courtesy of PeterBell 1. Add the desired extension in httpd.conf # JRun Settings LoadModule]]></description>
			<content:encoded><![CDATA[<p>With recent client developments, I fiddled my way on how to protect IPR of my cfc/cfm source codes. Two tasks in mind was to hide the cfm extension from Apache and precompile the CF source files (cfm/cfc).</p>
<p><strong>Hiding the cfm extension <a href="http://www.pbell.com/index.cfm/2007/3/31/Processing-html-files-using-ColdFusion--on-a-Mac-or-a-PC">courtesy of PeterBell</a></strong><br />
1. Add the desired extension in httpd.conf</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;"># JRun Settings
LoadModule jrun_module &quot;D:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun22.so&quot;
&lt;ifmodule&gt;
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore &quot;D:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store&quot;
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl &lt;optionally&gt;
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    AddHandler jrun-handler .cfm .cfml .cfc .cfr .cfswf .rup
&lt;/optionally&gt;
&lt;/ifmodule&gt;</pre></div></div>

<p>2. In C:\CFusionMX7\wwwroot\WEB-INF\web.xml</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet</span> -mapping <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;macromedia_mapping_14&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;servlet</span> -name<span style="color: #000000; font-weight: bold;">&gt;</span></span>CfmServlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url</span> -pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span>*.rup<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>3. Restart Apache and ColdFusion.</p>
<p><strong>Re-compile templates for sourceless deployment.</strong>.<br />
1. Applications can now be distributed without the underlying source code. Run cfcompile as follows&#8230;</p>
<p><code><br />
cfcompile -deploy webroot directory-to-compile output-directory<br />
</code></p>
<p>2. Compiled CF code goes into [cfusionmx]\wwwroot\WEB-INF\cfclasses.  CFMX compiles and runs the code from this cfclasses directory, regardless of the location of the source file.</p>
<p>3. To see the generated Java code, Edit the file [cfusionmx]\wwwroot\WEB-INF\web.xml. Change &#8220;coldfusion.compiler.saveJava&#8221; from false to true. Restart the CF server.</p>
<p>4. Bottomline enable trusted cache on CFADMIN for production environments.</p>
<p>Main Reference:<br />
<a href="http://coldfusion.sys-con.com/read/41684.htm">Compilation and Precompilation in CFMX Templates By Charlie Arehart</a></p>
<p><a href="http://coldfusion.sys-con.com/read/48654.htm">Deploying Applications with ColdFusion MX 7 By Dave Carabetta</a></p>
<p>Future readings include EAR/WAR Deployment&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/06/hiding-and-protecting-cfm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bean creation exception in ColdSpring</title>
		<link>/wordpress/2007/03/bean-creation-exception-in-coldspring/</link>
		<comments>/wordpress/2007/03/bean-creation-exception-in-coldspring/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 21:33:44 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[coldspring]]></category>

		<guid isPermaLink="false">/wordpress/?p=41</guid>
		<description><![CDATA[I spent almost 45 minutes searching for the problem in Bean Creation in ColdSpring. Bean creation exception in poimgr.model.service.FieldService Invalid CFML construct found on line 23 at column 87.:ColdFusion was looking at the following text: ) The CFML compiler was processing: a cfreturn tag beginning on line 23, column 18. a cfreturn tag beginning on]]></description>
			<content:encoded><![CDATA[<p>I spent almost 45 minutes searching for the problem in Bean Creation in ColdSpring.</p>
<p><code><br />
<strong>Bean creation exception in poimgr.model.service.FieldService<br />
Invalid CFML construct found on line 23 at column 87.:ColdFusion was looking at the following text: </strong></code></p>
<p><strong>)</strong></p>
<p><strong>The CFML compiler was processing: </strong></p>
<ul>
<li><strong>a cfreturn tag beginning on line 23, column 18. </strong></li>
<li><strong>a cfreturn tag beginning on line 23, column 18.</strong></li>
</ul>
<p>This basically means that there si a problem in FieldService at line 23!!!</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;">      1 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfcomponent</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;FieldService&quot;</span> displayname<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;FieldService&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span>
      2         <span style="color: #808080; font-style: italic;">&lt;!--- Constructor ---&gt;</span>
      3         <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;init&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;FieldService&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span> <span style="color: #0000FF;">hint</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;I am a new FieldService&quot;</span><span style="color: #0000FF;">&gt;</span></span>
      4                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
      5         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
      6
      7         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;setFieldBlockGateway&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;void&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span>
      8                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;fieldBlockGateway&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;poimgr.model.db.FieldBlockGateway&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&quot;</span><span style="color: #0000FF;">&gt;</span></span>
      9                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> variables.fieldblockgateway<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;arguments.fieldBlockGateway&quot;</span><span style="color: #0000FF;">&gt;</span></span>
     10         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfset</span><span style="color: #0000FF;">&gt;</span></span>
     11
     12         <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getFieldBlockGateway&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;poimgr.model.db.FieldBlockGateway&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span>
     13                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
     14         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
     15
     16
     17         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getFieldBlocks&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;any&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span>
     18                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
     19         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
     20
     21         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;sortFieldBlocks&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;any&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span>
     22                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;columnName&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;string&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&quot;</span><span style="color: #0000FF;">&gt;</span></span>
     23                 <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
     24         <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
     25
     26
     27
     28 <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfargument</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;">cffunction</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;">cfargument</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;">cffunction</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;">cfcomponent</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>Notice the &#8220;))&#8221; here&#8230;<br />
<code><br />
<cfreturn>.<br />
</cfreturn></code></p>
<p>Descriptive Error mechanisms need to be enhanced or Im just plain ol stupid.</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/03/bean-creation-exception-in-coldspring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppTemplate Released Beta</title>
		<link>/wordpress/2007/02/apptemplate-released-beta/</link>
		<comments>/wordpress/2007/02/apptemplate-released-beta/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 10:51:19 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[coldspring]]></category>
		<category><![CDATA[modelglue]]></category>
		<category><![CDATA[reactor]]></category>

		<guid isPermaLink="false">/wordpress/?p=35</guid>
		<description><![CDATA[This is my beta release of apptemplate which runs ColdFusion, ColdSpring and Reactor. To configure: 1. rename all instances of apptemplate to your &#8220;myapplication&#8221; found in the ff files; Application.cfm:2:&#60;cfapplication name=&#34;apptemplate&#34; sessionmanagement=&#34;true&#34;&#62; build.xml:2: &#60;property name=&#34;source&#34; value=&#34;E:\wwwroot\apptemplate&#34;&#62; build.xml:3: &#60;/property&#62;&#60;property name=&#34;target&#34; value=&#34;E:\wwwroot\apptemplate&#34;&#62; build.xml:12: token=&#34;apptemplate&#34; build.xml:13: value=&#34;apptemplate&#34; config/ModelGlue.xml:4: &#60;controller name=&#34;SecurityController&#34; type=&#34;apptemplate.controller.SecurityController&#34;&#62; config/ModelGlue.xml:10: &#60;/controller&#62;&#60;controller name=&#34;UserController&#34; type=&#34;apptemplate.controller.UserController&#34;&#62; config/ColdSpring.xml:12: &#60;property name=&#34;viewMappings&#34;&#62;&#60;value&#62;/apptemplate/views&#60;/value&#62;&#60;/property&#62;]]></description>
			<content:encoded><![CDATA[<p>This is my beta release of apptemplate which runs ColdFusion, ColdSpring and Reactor.<br />
To configure:</p>
<p>1. rename all instances of apptemplate to your &#8220;myapplication&#8221; found in the ff files;</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Application.cfm:2:&lt;cfapplication name=&quot;apptemplate&quot; sessionmanagement=&quot;true&quot;&gt;
build.xml:2:
&lt;property name=&quot;source&quot; value=&quot;E:\wwwroot\apptemplate&quot;&gt;
build.xml:3:
&lt;/property&gt;&lt;property name=&quot;target&quot; value=&quot;E:\wwwroot\apptemplate&quot;&gt;
build.xml:12:          token=&quot;apptemplate&quot;
build.xml:13:          value=&quot;apptemplate&quot;
config/ModelGlue.xml:4:         &lt;controller name=&quot;SecurityController&quot; type=&quot;apptemplate.controller.SecurityController&quot;&gt;
config/ModelGlue.xml:10:                &lt;/controller&gt;&lt;controller name=&quot;UserController&quot; type=&quot;apptemplate.controller.UserController&quot;&gt;
config/ColdSpring.xml:12:
&lt;property name=&quot;viewMappings&quot;&gt;&lt;value&gt;/apptemplate/views&lt;/value&gt;&lt;/property&gt;
config/ColdSpring.xml:13:
&lt;property name=&quot;generatedViewMapping&quot;&gt;&lt;value&gt;/apptemplate/views/generated&lt;/value&gt;&lt;/property&gt;
config/ColdSpring.xml:27:               &lt;constructor -arg name=&quot;pathToConfigXml&quot;&gt;&lt;value&gt;/apptemplate/config/Reactor.xml&lt;/value&gt;&lt;/constructor&gt;
config/ColdSpring.xml:28:
&lt;property name=&quot;project&quot;&gt;&lt;value&gt;apptemplate&lt;/value&gt;&lt;/property&gt;
config/ColdSpring.xml:29:
&lt;property name=&quot;dsn&quot;&gt;&lt;value&gt;apptemplate&lt;/value&gt;&lt;/property&gt;
config/ColdSpring.xml:31:
&lt;property name=&quot;mapping&quot;&gt;&lt;value&gt;/apptemplate/model/data&lt;/value&gt;&lt;/property&gt;
config/ColdSpring.xml:48:       &lt;bean id=&quot;dataAccess&quot; class=&quot;apptemplate.model.db.DataAccess&quot; singleton=&quot;true&quot;&gt;
config/ColdSpring.xml:53:                       &lt;value&gt;apptemplate&lt;/value&gt;
config/ColdSpring.xml:57:       &lt;/bean&gt;&lt;bean id=&quot;utility&quot; class=&quot;apptemplate.model.ValidationUtility&quot; singleton=&quot;true&quot;&gt;&lt;/bean&gt;
config/ColdSpring.xml:62:       &lt;bean id=&quot;userGateway&quot; class=&quot;apptemplate.model.db.UserGateway&quot; singleton=&quot;true&quot; autowire=&quot;byName&quot;&gt;&lt;/bean&gt;
config/ColdSpring.xml:64:       &lt;bean id=&quot;userDAO&quot; class=&quot;apptemplate.model.db.UserDAO&quot; singleton=&quot;true&quot; autowire=&quot;byName&quot;&gt;&lt;/bean&gt;
config/ColdSpring.xml:66:       &lt;bean id=&quot;securityService&quot; class=&quot;apptemplate.model.service.SecurityService&quot; singleton=&quot;true&quot;&gt;&lt;/bean&gt;
config/ColdSpring.xml:68:       &lt;bean id=&quot;userService&quot; class=&quot;apptemplate.model.service.UserService&quot; singleton=&quot;true&quot;&gt;
controller/UserController.cfc:3:    &lt;cffunction name=&quot;init&quot; returntype=&quot;apptemplate.controller.UserController&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
controller/UserController.cfc:11:        &lt;cfargument name=&quot;userService&quot; type=&quot;apptemplate.model.service.UserService&quot; required=&quot;true&quot;&gt;
controller/UserController.cfc:15:    &lt;cffunction name=&quot;getUserService&quot; returntype=&quot;apptemplate.model.service.UserService&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
controller/SecurityController.cfc:3:    &lt;/cffunction&gt;&lt;cffunction name=&quot;init&quot; returntype=&quot;apptemplate.controller.SecurityController&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
controller/SecurityController.cfc:11:        &lt;cfargument name=&quot;securityService&quot; type=&quot;apptemplate.model.service.SecurityService&quot; required=&quot;true&quot;&gt;
controller/SecurityController.cfc:15:    &lt;cffunction name=&quot;getSecurityService&quot; returntype=&quot;apptemplate.model.service.SecurityService&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
controller/SecurityController.cfc:20:        &lt;cfargument name=&quot;userService&quot; type=&quot;apptemplate.model.service.UserService&quot; required=&quot;true&quot;&gt;
controller/SecurityController.cfc:24:    &lt;cffunction name=&quot;getUserService&quot; returntype=&quot;apptemplate.model.service.UserService&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
model/service/SecurityService.cfc:3:    &lt;/cffunction&gt;&lt;cffunction name=&quot;init&quot; returntype=&quot;apptemplate.model.service.SecurityService&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
model/service/UserService.cfc:8:                &lt;cfargument name=&quot;userGateway&quot; type=&quot;apptemplate.model.db.UserGateway&quot; required=&quot;true&quot;&gt;
model/service/UserService.cfc:12:       &lt;cffunction name=&quot;getUserGateway&quot; access=&quot;public&quot; returntype=&quot;apptemplate.model.db.UserGateway&quot; output=&quot;false&quot;&gt;
model/service/UserService.cfc:17:               &lt;cfargument name=&quot;userDAO&quot; type=&quot;apptemplate.model.db.UserDAO&quot; required=&quot;true&quot;&gt;
model/service/UserService.cfc:21:       &lt;cffunction name=&quot;getUserDAO&quot; access=&quot;public&quot; returntype=&quot;apptemplate.model.db.UserDAO&quot; output=&quot;false&quot;&gt;
model/db/UserDAO.cfc:1:&lt;cfcomponent name=&quot;UserDAO&quot; displayname=&quot;UserDAO&quot; extends=&quot;apptemplate.model.db.DataAccess&quot; output=&quot;false&quot;&gt;
model/db/UserGateway.cfc:1:&lt;/cfcomponent&gt;&lt;cfcomponent name=&quot;UserGateway&quot; displayname=&quot;UserGateway&quot; extends=&quot;apptemplate.model.db.DataAccess&quot; output=&quot;false&quot;&gt;
&lt;/cfcomponent&gt;&lt;/cffunction&gt;&lt;/cfargument&gt;&lt;/cffunction&gt;&lt;/cfargument&gt;&lt;/cffunction&gt;&lt;/cfargument&gt;&lt;/cffunction&gt;&lt;/cfargument&gt;&lt;/cffunction&gt;&lt;/cfargument&gt;&lt;/cffunction&gt;&lt;/bean&gt;&lt;/controller&gt;&lt;/property&gt;&lt;/cfapplication&gt;</pre></div></div>

<p>2. Create the database w/c runs on MySQL 5 and is found on<br />
<code><br />
apptemplate/<br />
db/<br />
</code></p>
<p>3. If you want to reload all classes, append &#8220;init&#8221; on the URL string.</p>
<p><a href="/wordpress/images/apptemplate.zip">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/02/apptemplate-released-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ModelGlue&#8217;s Unity with ModelGlue 1.1</title>
		<link>/wordpress/2007/02/modelglues-unity-with-modelglue-11/</link>
		<comments>/wordpress/2007/02/modelglues-unity-with-modelglue-11/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 14:34:50 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[modelglue]]></category>

		<guid isPermaLink="false">/wordpress/?p=34</guid>
		<description><![CDATA[I still received some errors in bean creation after I extracted the &#8220;reactor&#8221; in the webroot. It seems creating a coldfusion mapping is better.]]></description>
			<content:encoded><![CDATA[<p>I still received some errors in bean creation after I extracted the &#8220;reactor&#8221; in the webroot. It seems creating a coldfusion mapping is better.</p>
<p><img src="/wordpress/images/reactor_cf_mapping.png"/></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/02/modelglues-unity-with-modelglue-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing CFCs using UML with Poseidon</title>
		<link>/wordpress/2007/02/writing-cfcs-using-uml-with-poseidon/</link>
		<comments>/wordpress/2007/02/writing-cfcs-using-uml-with-poseidon/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 14:26:44 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[uml]]></category>

		<guid isPermaLink="false">/wordpress/?p=33</guid>
		<description><![CDATA[It seems the xmi2cfc tool from cfcxmi.tigris.org works only for Poseidon 2.x versions. The visio works well and poseidon can export the xmi as well but I still encounter problems during the xmi to cfc conversion. I just bought a 1GB ram for my notebook since Poseidon peaks at 200MB. How to create cfc&#8217;s with]]></description>
			<content:encoded><![CDATA[<p>It seems the xmi2cfc tool from cfcxmi.tigris.org works only for Poseidon 2.x versions. The visio works well and poseidon can export the xmi as well but I still encounter problems during the xmi to cfc conversion.</p>
<p>I just bought a 1GB ram for my notebook since Poseidon peaks at 200MB. How to create cfc&#8217;s with Poseidon?</p>
<p>1. Download and install Poseidon. Im using Poseidon 5 Professional.<br />
2. Download the poseidon custom templates from <a href="http://cfcxmi.tigris.org/">http://cfcxmi.tigris.org/</a>.<br />
3. Extract it to Poseidon/lib/. You should have the ff directories:</p>
<p>Poseidon/<br />
lib/<br />
custom/</p>
<p>4. Start poseidon<br />
5. Click on &#8220;Generation&#8221; -&gt; &#8220;Java&#8221;<br />
6. Click on the ellipses tool and point to the custom templates.<br />
7. &#8220;Apply&#8221; the settings.<br />
8. Create your class<br />
9. Click on the source code to view your cfc.</p>
<p>I have made some changes to the templates to reflect the output=&#8221;false&#8221; and required=&#8221;true&#8221;. You can download the templates from <a href="/wordpress/images/custom.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/02/writing-cfcs-using-uml-with-poseidon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdSpring bean creation magic&#8230;</title>
		<link>/wordpress/2007/02/coldspring-bean-creation-magic/</link>
		<comments>/wordpress/2007/02/coldspring-bean-creation-magic/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 05:06:48 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[coldspring]]></category>
		<category><![CDATA[modelglue]]></category>

		<guid isPermaLink="false">/wordpress/?p=31</guid>
		<description><![CDATA[Adam describes some fun and exciting changes in ModelGlue Unity. I can now ditch cflocation by using argument.event.forward(&#8220;location.cfm&#8221;). Its just now that im loving ColdSpring, I think its much better to instantiate beans and set/create other objects using setters/getters through the property instead of constructor-arg. Here&#8217;s an example: &#60;cfcomponent displayname=&#34;UserService&#34; output=&#34;false&#34; hint=&#34;I am a UserService.&#34;&#62;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.adamfortuna.com/2006/10/30/4-fun-uses-of-model-glue/">Adam describes some fun and exciting changes in ModelGlue Unity. </a>  I can now ditch cflocation by using argument.event.forward(&#8220;location.cfm&#8221;).</p>
<p>Its just now that im loving ColdSpring, I think its much better to instantiate beans and set/create other objects using setters/getters through the <em>property</em> instead of <em>constructor-arg</em>. Here&#8217;s an example:</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;">cfcomponent</span> displayname<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;UserService&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span> <span style="color: #0000FF;">hint</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;I am a UserService.&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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;init&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;UserService&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span> <span style="color: #0000FF;">hint</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;I am a new UserService&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;">cfreturn</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;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;setUserGateway&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;void&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span> <span style="color: #0000FF;">hint</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Dependency: UserService&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;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;userGateway&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;cfcodetrack.model.UserGateway&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&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> variables.usergateway<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;arguments.userGateway&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><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getUserGateway&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;cfcodetrack.model.UserGateway&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&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;">cfreturn</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;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>	
&nbsp;
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;authenticate&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;string&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&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;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;username&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;string&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&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;">cfargument</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;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;password&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;string&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&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;">cfdump</span> <span style="color: #000000; font-weight: bold;">var</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#password#&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;">cfabort</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;">cfabort</span><span style="color: #0000FF;">&gt;</span></span>	
&nbsp;
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getUsers&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;any&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&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;">cfreturn</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;">cfreturn</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</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;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfargument</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;">cffunction</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;">cfargument</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;">cffunction</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;">cfcomponent</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

<p>In your ColdSpring.xml your beans should only look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;dsn&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;cfcodetrack.model.dsn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constructor</span> -arg <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;dsn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>cfcodetrack<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/constructor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>	
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;reactorFactory&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;reactor.reactorFactory&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constructor</span> -arg <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;configuration&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ref</span> <span style="color: #000066;">bean</span>=<span style="color: #ff0000;">&quot;reactorConfiguration&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/constructor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!-- Security Service</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;securityService&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;cfcodetrack.model.SecurityService&quot;</span> <span style="color: #000066;">singleton</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;userGateway&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;cfcodetrack.model.UserGateway&quot;</span> <span style="color: #000066;">singleton</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;reactorFactory&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ref</span> <span style="color: #000066;">bean</span>=<span style="color: #ff0000;">&quot;reactorFactory&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;dsn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ref</span> <span style="color: #000066;">bean</span>=<span style="color: #ff0000;">&quot;dsn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;userService&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;cfcodetrack.model.UserService&quot;</span> <span style="color: #000066;">singleton</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;userGateway&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ref</span> <span style="color: #000066;">bean</span>=<span style="color: #ff0000;">&quot;userGateway&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/02/coldspring-bean-creation-magic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
