<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
	<channel>
	<title>indyblog</title>
	<link>http://nagpals.com/blog/</link>
	<description>Tech Blog of Indiver Nagpal -- ColdFusion, Flex and Groovy</description>
	<generator>Mango 1.3.1</generator>
	
	 
      <creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-nd/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/indiver" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
         <title>Coda Snippets for ColdFusion, MXUnit and ShadoCMS</title>
         <description>&lt;p&gt;&lt;img style="float: right;" src="/blog/assets/content//images/CodaLogo-20090711-150913.png" alt="Coda - Grow Beautiful Code" width="187" height="60" /&gt;If you've been following my blog, you might have seen that I've started using this wonderful editor called &lt;a title="Panic Coda" href="http://www.panic.com/coda/"&gt;Coda&lt;/a&gt; for most of the development work I do. It has very nice built-in support for ColdFusion and given that it is a native Mac app, the interface is beautiful. And it has a few really nice features like built-in FTP and Clips (snippets).&lt;/p&gt;
&lt;p&gt;Over the last month or so, I've built up quite a few clips, which are just snippets in CFEclipse-speak, for ColdFusion, MXUnit and ShadoCMS. Obviously I'm adding more as I find time or as I need, but here is what I have managed to put together till now.&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/CodaClips-20090711-145658.png" alt="Coda Clips" width="519" height="324" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a title="ColdFusion Clips" href="/blog/assets/content/downloads/ColdFusion-20090711.clips.zip"&gt;ColdFusion Clips&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="MXUnit Clips" href="/blog/assets/content/downloads/MXUnit-20090711.clips.zip"&gt;MXUnit Clips&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/blog/assets/content/downloads/ShadoCMS-20090711.clips.zip"&gt;ShadoCMS Clips&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To install, simply download and double-click the file. It should automatically become available in the Clips area. Or you can open the Clips window and right click on the left side of the Clips window:&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/ImportCodaClips-20090711-145734.png" alt="" width="523" height="327" /&gt;&lt;/p&gt;
&lt;p&gt;Also, I've set up keyboard triggers for most of the clips. You might want to change them to what you like.&lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;
&lt;p&gt;PS: My initial &lt;a title="Jules' ColdFusion Clips" href="/blog/post.cfm/apache-configuration-language-module-for-coda#comment-EA86CA2F-D533-AD29-70734A77A995C023"&gt;ColdFusion clips started off with this comment&lt;/a&gt; on a previous blog entry.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/GWYE0bJ2cVI" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/GWYE0bJ2cVI/my-coda-snippets-for-coldfusion-mxunit-and-shadocms</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/my-coda-snippets-for-coldfusion-mxunit-and-shadocms</guid>
         <category>ColdFusion</category><category>Coda</category>
         <pubDate>Sat, 11 Jul 2009 02:43:22 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/my-coda-snippets-for-coldfusion-mxunit-and-shadocms</feedburner:origLink></item> 
      <item>
         <title>How do you edit a 862 MB Text File on a Mac?</title>
         <description>&lt;p&gt;Right... so I have this large large large text file. 862 MB. And I wanted to change the first few lines in it.&lt;/p&gt;
&lt;p&gt;First I tried the usual editors... BBEdit, Coda, TextMate, TextWrangler etc. All crashed and burned.&lt;/p&gt;
&lt;p&gt;Then went into Terminal to give the text-based editors a try. And to my amazement (and much joy) the file opened up in both Pico and vi. Although it took 30-odd seconds before the text showed up on the screen, but once it was there, I could scroll around and edit. And saving the file was pretty quick as well.&lt;/p&gt;
&lt;p&gt;Long live command line!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/nxTjOF1bFiM" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/nxTjOF1bFiM/how-do-you-edit-a-862-mb-text-file-on-a-mac</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/how-do-you-edit-a-862-mb-text-file-on-a-mac</guid>
         <category>Tools</category>
         <pubDate>Tue, 16 Jun 2009 01:17:37 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/how-do-you-edit-a-862-mb-text-file-on-a-mac</feedburner:origLink></item> 
      <item>
         <title>SES URLs in MangoBlog on Tomcat</title>
         <description>&lt;p&gt;My live blog site runs on ColdFusion (using JRun) with the SES servlet mappings in web.xml. I use the excellent MangoBlog engine for powering my blog. All this means that I have pretty-ish URLs like &lt;span class="monospace"&gt;http://nagpals.com/blog/post.cfm/ftp-in-eclipse-hooray&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Today I wanted to run a copy of my blog on a dev box. But on that dev box, I chose to use JBoss-Tomcat. And the SES servlet mappings that work in ColdFusion on JRun, do NOT work on ColdFusion on Tomcat-JBoss as they are not supported by the servlet engine.&lt;/p&gt;
&lt;p&gt;To get around it, I simply used Apache-based rewrites so that the SES urls like &lt;span class="monospace"&gt;http://nagpals.com/blog/&lt;strong&gt;post.cfm/ftp-in-eclipse-hooray&lt;/strong&gt;&lt;/span&gt; automatically get mapped to &lt;span class="monospace"&gt;http://nagpals.com/blog/&lt;strong&gt;post.cfm?entry=ftp-in-eclipse-hooray&lt;/strong&gt;&lt;/span&gt;. &lt;/p&gt;
&lt;p&gt;Here are the rewrites that I put in place to get posts, categories, pages and search to work.&lt;/p&gt;
&lt;pre name="code" class="xhtml:nogutter"&gt;&amp;lt;VirtualHost *:80 &amp;gt;&lt;br /&gt;  ServerName nagpals.local&lt;br /&gt;  RewriteEngine On&lt;br /&gt;  RewriteOptions Inherit&lt;br /&gt;&lt;br /&gt;  RewriteRule ^/blog/post.cfm/(.*) http://127.0.0.1:8680/blog/post.cfm?entry=$1 [P,L]&lt;br /&gt;  RewriteRule ^/blog/page.cfm/(.*) http://127.0.0.1:8680/blog/page.cfm?entry=$1 [P,L]&lt;br /&gt;  RewriteRule ^/blog/archives.cfm/search/(.*) http://127.0.0.1:8680/blog/archives.cfm$1 [P,L]&lt;br /&gt;  RewriteRule ^/blog/archives.cfm/category/(.*) http://127.0.0.1:8680/blog/archives.cfm?category=$1 [P,L]&lt;br /&gt;  RewriteRule ^/(.*) http://127.0.0.1:8680/$1 [P,L]&lt;br /&gt;&lt;br /&gt;  ProxyPassReverse / http://127.0.0.1:8680/&lt;br /&gt;  ProxyPreserveHost on &lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;This would be useful for another reason. If you use MangoBlog on Railo running on JBoss/Resin with Apache in front, you can employ the same trick to get around the whole issue of SES URLs.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/y3elAUSp-z0" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/y3elAUSp-z0/ses-urls-in-mangoblog-on-tomcat</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/ses-urls-in-mangoblog-on-tomcat</guid>
         <category>ColdFusion</category><category>Apache</category><category>Railo</category><category>JBoss</category>
         <pubDate>Sun, 14 Jun 2009 03:59:26 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/ses-urls-in-mangoblog-on-tomcat</feedburner:origLink></item> 
      <item>
         <title>Apache Configuration Language Module for Coda</title>
         <description>&lt;p&gt;After my last post on &lt;a href="/blog/post.cfm/ftp-in-eclipse-hooray"&gt;FTP in Eclipse&lt;/a&gt;, I started using &lt;a href="http://www.panic.com/coda/"&gt;Coda&lt;/a&gt; as an alternative editor for CFML. Must say that it is one of the nicest applications that I've used (sorry Windows users, it is a Mac only app).&lt;/p&gt;
&lt;p&gt;It support CFML code completion, snippets and syntax highlighting. Very quick and easy to use.&lt;/p&gt;
&lt;p&gt;In fact, I switched all text files to open in Coda. It is quite extensible and provides quite a few language modules for syntax highlighting and code completion.&lt;/p&gt;
&lt;p&gt;Since I'm usually twiddling with Apache conf files, I found an Apache language module (http://www.codingmonkeys.de/subethaedit/modes.html). However, that module is quite old... it was last updated in 2004.&lt;/p&gt;
&lt;p&gt;So, I decided to spend a little time and bring it up to date. It now supports all directives and keywords up to Apache 2.2.&lt;/p&gt;
&lt;p&gt;Here is the updated version of the &lt;a href="/blog/assets/content//downloads/ApacheConf.mode.zip"&gt;Apache language module&lt;/a&gt;. Simply unzip it in &lt;span class="monospace"&gt;~/Library/Application Support/Coda/Modes/&lt;/span&gt; folder and restart Coda.&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 1px solid black;" src="/blog/assets/content//images/Coda_Apache_Conf_Module-20090614-130722.png" alt="" width="592" height="425" /&gt;&lt;/p&gt;
&lt;p&gt;I find it really useful as you can immediately see syntax errors. It really helps in cutting down the number of times you to test Apache configuration file changes, and even number of Apache restarts.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/a9fav88uR9Y" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/a9fav88uR9Y/apache-configuration-language-module-for-coda</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/apache-configuration-language-module-for-coda</guid>
         <category>Apache</category><category>Tools</category><category>Coda</category>
         <pubDate>Sun, 14 Jun 2009 00:41:54 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/apache-configuration-language-module-for-coda</feedburner:origLink></item> 
      <item>
         <title>FTP in Eclipse -- Hooray!</title>
         <description>&lt;p&gt;Can't believe it, just can't believe! All this while I've been finding all kinds of ways to try and work with ColdFusion content on FTP servers, but there is a way built right into Ecplise to connect to an FTP site!&lt;/p&gt;
&lt;p&gt;In the past I was pursuaded by colleagues to use Aptana, which caused me other types of grief. Then I used CyberDuck to open files directly in BBEdit and edit them there. At one point I used a couple of other plugins. All these approaches just caused more issues than they solved!&lt;/p&gt;
&lt;p&gt;So today, when looking at the different perspectives in Eclipse, I found one called "Remote Filesystem Explorer"! With an intriguing name like that, I thought I'd give it a go and switched to it.&lt;/p&gt;
&lt;p&gt;Low-and-behold! Right-clicking the navigator pane promoted me to setup a new connection, and guess what I saw!&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/remote-filesystem-explorer-20090611-123856.png" alt="FTP in Eclipse Using Remote Filesystem Explorer" width="523" height="549" /&gt;&lt;/p&gt;
&lt;p&gt;Miracle! And it works like a charm and seems very reliable.&lt;/p&gt;
&lt;p&gt;BTW, this is on Eclipse 3.4.2.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/lCn2KYUWtPI" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/lCn2KYUWtPI/ftp-in-eclipse-hooray</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/ftp-in-eclipse-hooray</guid>
         <category>Tools</category><category>Eclipse</category>
         <pubDate>Thu, 11 Jun 2009 00:12:39 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/ftp-in-eclipse-hooray</feedburner:origLink></item> 
      <item>
         <title>Monitoring a JBoss Instance Running ColdFusion and Railo with JConsole</title>
         <description>&lt;p&gt;Today I needed to use JConsole to connect up to a JBoss instance running ColdFusion and Railo. I wanted to see thread usage etc. when starting the application I'm working on.&lt;/p&gt;
&lt;p&gt;In the past when I've used JConsole, it used to automatically detect the running JVMs and show them in the startup dialog box. However, today I wasn't seeing the running JVMs. &lt;/p&gt;
&lt;p&gt;&lt;img style="border: 1px solid black;" src="/blog/assets/content//images/jconsole-missing-jvm-20090611-092223.png" alt="JConsole, missing JVMs" width="399" height="300" /&gt;&lt;/p&gt;
&lt;p&gt;I could connect using the Advanced option in JConsole and by putting in the JMX Connector URI. But connecting like that means that JConsole does not provide information on threads/memory etc. -- stuff I wanted to see.&lt;/p&gt;
&lt;p&gt;After a bit of digging around I found that you need to pass the following arguments to the JVM that you want to monitor in JConsole:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Once I added these JVM arguments and restart my JBoss instance, JConsole automatically detected running JVMs.&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 1px solid black;" src="/blog/assets/content//images/jconsole-with-jvms-20090611-092655.png" alt="JConsole with JVMs" width="399" height="300" /&gt;&lt;/p&gt;
&lt;p&gt;Normally JConsole should automatically detect running JVMs. But I &lt;a title="JMX Console on Java 6" href="http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html#gddaw"&gt;believe&lt;/a&gt; this has to do with the fact that I was using Java version 1.5.0_16. If you are using Java 6, you shouldn't need to do this.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/uJ60jcyie38" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/uJ60jcyie38/monitoring-a-jboss-instance-running-coldfusion-and-railo-with-jconsole</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/monitoring-a-jboss-instance-running-coldfusion-and-railo-with-jconsole</guid>
         <category>ColdFusion</category><category>Tools</category><category>Railo</category><category>JBoss</category>
         <pubDate>Wed, 10 Jun 2009 21:07:47 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/monitoring-a-jboss-instance-running-coldfusion-and-railo-with-jconsole</feedburner:origLink></item> 
      <item>
         <title>Using BBEdit for Editing Apache Configuration Files</title>
         <description>&lt;p&gt;Off late, I've been working a lot with Apache configration files. And since I use &lt;a title="BBEdit" href="http://www.barebones.com/" target="_self"&gt;BBEdit&lt;/a&gt; for most of my text file editing, I invariably use BBEdit for editing Apache configuration files. My workflow for working with these files is now quite settled. I thought I'd share it here.&lt;/p&gt;
&lt;h2&gt;Syntax Color Coding&lt;/h2&gt;
&lt;p&gt;BBEdit has very nice third-party &lt;a title="Language Module for Apache Configuration Files" href="http://daringfireball.net/projects/apacheconfig/"&gt;language module for Apache Configuration files&lt;/a&gt;. The module automagically provides syntax coloring for all the Apache keywords, making it really easy to read configuration files. If you have ever had to work with Apache configuration files, you will see the utility in something like this. Obviously if you make any error in spelling out a directive or any other keyword, it does not get color-coded, so one ends up making fewer errors.&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 1px solid black;" src="/blog/assets/content//images/apache_color_coding-20090610-092401.png" alt="Apache Configuration Files Color Coding" width="399" height="323" /&gt;&lt;/p&gt;
&lt;h2&gt;Editing All Files at One Go&lt;/h2&gt;
&lt;p&gt;BBEdit has a very feature where one can open up a whole folder for editing. All files in the folder being edited become available on one side of the screen. &lt;/p&gt;
&lt;p&gt;&lt;img style="border: 1px solid black;" src="/blog/assets/content//images/apache_file_view-20090610-092513.png" alt="BBEdit Folder View" width="404" height="263" /&gt;&lt;/p&gt;
&lt;p&gt;This comes in quite handy if you have a lot of include files in your main Apache conf. I have my enviornment setup so that I issue the following on Terminal and BBEdit loads up the folder view for Apache configuration files:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;bbedit /private/etc/apache2&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Testing Configuration&lt;/h2&gt;
&lt;p&gt;After making any change to configuration files, I normally test if the changes are ok or not. I've created a simple shell script that does the needful.&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;#!/bin/sh&lt;br /&gt;sudo apachectl -t&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using BBEdit you can run this script from within BBEdit, without having to open Terminal. You need to click on the top menu option which looks like &lt;strong&gt;#!&lt;/strong&gt; to bring up the menu to run the script.&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/apache_run_script-20090610-092324.png" alt="" width="373" height="229" /&gt;&lt;/p&gt;
&lt;h2&gt;Restarting Apache&lt;/h2&gt;
&lt;p&gt;If the test is ok, you can restart Apache. I have another simply shell script that does the needful:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;#!/bin/sh&lt;br /&gt;sudo apachectl restart&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Again, I run it using the BBEdit option to run scripts in Terminal.&lt;/p&gt;
&lt;p&gt;All in all, with the plugin and these simply scripts, my Apache webserver configuration tasks have become much simpler and more streamlined.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/DbaisDkeWBU" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/DbaisDkeWBU/editing-apache-configuration-files-in-bbedit</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/editing-apache-configuration-files-in-bbedit</guid>
         <category>Apache</category><category>Tools</category>
         <pubDate>Tue, 09 Jun 2009 20:16:20 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/editing-apache-configuration-files-in-bbedit</feedburner:origLink></item> 
      <item>
         <title>JSP Issues with Railo</title>
         <description>&lt;p&gt;In JBoss, if you deploy Railo jars in &lt;span class="monospace"&gt;server/servername/lib&lt;/span&gt; folder (basically if you do a global Railo install), then you would have have noticed that JSP pages stop working. It appears that a global install of Railo seems to overwrite the servlet that handles JSP pages. As a result, each time you try and access JSP pages in any other application that is running on the same JBoss instance, you get a message like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HTTP Status 405 - HTTP method GET is not supported by this URLﾠ&lt;br /&gt;type Status reportﾠ&lt;br /&gt;message HTTP method GET is not supported by this URLﾠ&lt;br /&gt;description The specified HTTP method is not allowed for the requestedﾠ&lt;br /&gt;resource (HTTP method GET is not supported by this URL).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And this is quite irritating as other applications like jmx-console (which rely on JSP pages) stop working.&lt;/p&gt;
&lt;p&gt;The way to fix this is to not do a global install of Railo jars. Normally there is no compelling reason to do such an install.&lt;/p&gt;
&lt;p&gt;So basically deploy Railo as a EAR/WAR application, with the &lt;span class="monospace"&gt;WEB-INF/lib&lt;/span&gt; folder containing all the Railo jar files (instead of &lt;span class="monospace"&gt;server/servername/lib&lt;/span&gt; folder), and follow instructions on my earlier blog entry on &lt;a href="/blog/post.cfm/classloader-conflicts-in-railo-on-jboss"&gt;Fixing Classloader Conflicts in Railo on JBoss&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Since Railo libs are not installed for all apps on the server instance, JSPs start working, and chance of other such conflicts are reduced.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/CAAnSkoX1Xg" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/CAAnSkoX1Xg/jsp-issues-on-railo</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/jsp-issues-on-railo</guid>
         <category>Railo</category><category>JBoss</category>
         <pubDate>Thu, 04 Jun 2009 11:05:45 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/jsp-issues-on-railo</feedburner:origLink></item> 
      <item>
         <title>Fixing Classloader Conflicts in Railo on JBoss</title>
         <description>&lt;p&gt;If you've been working with Railo on JBoss, I'm sure you'd have run into an issue where the class loader throws error when the JBoss instance is started. These errors are caused due to conflicts between classes that are being loaded up by different applications in the JBoss server instance.&lt;/p&gt;
&lt;p&gt; &lt;a href="http://coldshen.com/blog/index.cfm/2008/8/2/Running-Railo-3-beta-on-JBoss-5"&gt;Some have suggested removing a few jar files&lt;/a&gt; from the Railo lib folder to get around this issue. Some others have suggested putting all the Railo jar files in the &lt;span class="monospace"&gt;server/servername/lib&lt;/span&gt; folder instead of the usual &lt;span class="monospace"&gt;server/servername/railo.war/lib&lt;/span&gt; folder. While both approaches work in that Railo starts up without any errors, but both are a ways to get around the problem rather than actually addressing it.&lt;/p&gt;
&lt;p&gt;The correct way to fix this issue is to make JBoss isloate classes loaded for different applications, thereby removing the possibiiity of conflicts. On JBoss 5 you can do this if you add a file in WEB-INF/jboss-classloading.xml that contains:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;classloading xmlns="urn:jboss:classloading:1.0"&lt;br /&gt;ﾠ             name="mywar.war"&lt;br /&gt;ﾠ             domain="DefaultDomain"&lt;br /&gt;ﾠ             export-all="NON_EMPTY"&lt;br /&gt;ﾠ             import-all="true"&amp;gt;&lt;br /&gt;&amp;lt;/classloading&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This defines how an application's classloader is setup and how the classes loaded for an application are share with other applications in the JBoss instance.&lt;/p&gt;
&lt;p&gt;After you add this file into railo.war/WEB-INF, restart the server with all the jars that ship with Railo, and all classes should load up without any issue.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/_nC3CYejp34" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/_nC3CYejp34/classloader-conflicts-in-railo-on-jboss</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/classloader-conflicts-in-railo-on-jboss</guid>
         <category>Railo</category><category>JBoss</category>
         <pubDate>Thu, 04 Jun 2009 10:38:29 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/classloader-conflicts-in-railo-on-jboss</feedburner:origLink></item> 
      <item>
         <title>JBoss.org Links to Railo</title>
         <description>&lt;p&gt;I might have missed this earlier, but I just noticed that Railo is now formally available on JBoss.org.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://jboss.org/projects/matrix"&gt;http://jboss.org/projects/matrix&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The link to Railo is under the category "Programming Model". The links for direct download and documentation are not yet there (as they are for other projects).&lt;/p&gt;
&lt;p&gt;Also, it is accessible through the main nav: Projects &amp;gt; Programming Model &amp;gt; Railo.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/StTbFPsL-Mk" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/StTbFPsL-Mk/jboss-org-links-to-railo</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/jboss-org-links-to-railo</guid>
         <category>Railo</category>
         <pubDate>Wed, 03 Jun 2009 21:10:36 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/jboss-org-links-to-railo</feedburner:origLink></item> 
      <item>
         <title>JBoss - Examples of twiddle</title>
         <description>&lt;p&gt;The twiddle utility that ships with JBoss is quite powerful. However, one has to struggle to find examples of how to use it.&lt;/p&gt;
&lt;p&gt;After trying a bunch of things, here are examples of some of the command that were quite useful for me:&lt;/p&gt;
&lt;h3&gt;Deploy a WAR/EAR&lt;/h3&gt;
&lt;p&gt;&lt;span class="monospace"&gt;twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:///Users/indy/Desktop/railo-jboss1.local"&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Undeploy a WAR/EAR&lt;/h3&gt;
&lt;p&gt;&lt;span class="monospace"&gt;twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" undeploy "file:///Users/indy/Desktop/railo-jboss1.local"&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Add an Alias for a Web Context&lt;/h3&gt;
&lt;p&gt;&lt;span class="monospace"&gt;twiddle.sh -s localhost:1499 invoke "jboss.web:host=a1,type=Host" addAlias railo-jboss1.local&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Find Aliases for a Web Context&lt;/h3&gt;
&lt;p&gt;&lt;span class="monospace"&gt;twiddle.sh -s localhost:1499 invoke "jboss.web:host=a1,type=Host" findAliases&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I also saw the following three resources and found them quite useful:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/4/html/Command_Line_Access_to_JMX-Sample_twiddle_Command_Usage.html"&gt;Samples of Twiddle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code.google.com/p/twiddling/"&gt;Google Project called Twiddling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.jit-consulting.de/java/jboss/extended-twiddle-querymethod-and-listdomains.html"&gt;Twiddle Methods&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;ﾠ&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/wWPso9Mib8U" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/wWPso9Mib8U/jboss-examples-of-twiddle</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/jboss-examples-of-twiddle</guid>
         <category>Railo</category><category>JBoss</category>
         <pubDate>Wed, 03 Jun 2009 11:11:15 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/jboss-examples-of-twiddle</feedburner:origLink></item> 
      <item>
         <title>JBoss - Deploying WAR/EAR from command line</title>
         <description>&lt;p&gt;Today I needed to deploy an application that lived outside the usual
deploy folder. I also needed the ability to deploy/undeploy that application
without actually having to restart the JBoss instance.&lt;/p&gt;
&lt;p&gt;The jmx-console provides the ability to deploy/undeploy apps. But to do it from the command line, I used the twiddle utility that lives in the bin folder.&lt;/p&gt;
&lt;p&gt;Deploying an application can be accomplished by:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:///Users/indy/Desktop/railo-jboss1.local"&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And undeploying an application can be accomplished by:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" undeploy "file:///Users/indy/Desktop/railo-jboss1.local"&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is quite an elegant solution if you need to do something like this.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/C71wG2ZH5_s" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/C71wG2ZH5_s/jboss-deploying-war-ear-from-command-line</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/jboss-deploying-war-ear-from-command-line</guid>
         <category>Railo</category><category>JBoss</category>
         <pubDate>Wed, 03 Jun 2009 03:43:06 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/jboss-deploying-war-ear-from-command-line</feedburner:origLink></item> 
      <item>
         <title>Running Railo and Adobe ColdFusion on the Same Context Root in JBoss</title>
         <description>&lt;p&gt;To make my applications run both on Railo ColdFusion and Adobe ColdFusion, I needed to make sure that code changes I was making for Railo did not break anything in Adobe CF. Initially, I set up two separate JBoss instances, one running AdobeCF and the other running RailoCF. However, it is a bit of a pain to start two servers, checkout content on both folders, sync files between two directories and so on.&lt;/p&gt;
&lt;p&gt;A much nicer way is to get both AdobeCF and RailoCF to run on the same JBoss instance. That is actually not a problem if you can run them in different contexts (e.g., AdobeCF on /adobecf and RailoCF on /railocf). But in my case, I need to run them both on the same context root: /. Getting that to work is slightly more tricky but way more elegant. This is what I did:&lt;/p&gt;
&lt;h2&gt;Modify Hosts File&lt;/h2&gt;
&lt;p&gt;First thing, I created two entries in my hosts file (I use Mac). One for a host called &lt;strong&gt;railoapp.local&lt;/strong&gt; and the other called &lt;strong&gt;adobeapp.local&lt;/strong&gt;. Both pointing to &lt;strong&gt;127.0.0.1.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;127.0.0.1        railoapp.local&lt;br /&gt;127.0.0.1        adobeapp.local&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;JBoss Server Instance&lt;/h2&gt;
&lt;p&gt;Next, created a JBoss (5.0.1) server instance by copying the "web" instance. Named the new instance as &lt;strong&gt;cfapps&lt;/strong&gt;. By default the instance runs on port 8080.&lt;/p&gt;
&lt;p&gt;Modify the &lt;strong&gt;jbossweb.sar/server.xml&lt;/strong&gt; to have two more &amp;lt;Host&amp;gt; nodes&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;         &amp;lt;Host name="railoapp.local"&amp;gt;&lt;br /&gt;
             &amp;lt;Alias&amp;gt;railoapp.local&amp;lt;/Alias&amp;gt;&lt;br /&gt;
         &amp;lt;/Host&amp;gt;&lt;br /&gt;
&lt;br /&gt;
         &amp;lt;Host name="adobeapp.local"&amp;gt;&lt;br /&gt;
             &amp;lt;Alias&amp;gt;&lt;/span&gt;&lt;span class="monospace"&gt;adobe&lt;/span&gt;&lt;span class="monospace"&gt;app.local&amp;lt;/Alias&amp;gt;&lt;br /&gt;
         &amp;lt;/Host&amp;gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Make sure you put the nodes at the correct location.&lt;/p&gt;
&lt;h2&gt;Modify Apache Conf File&lt;/h2&gt;
&lt;p&gt;Added directives for the two virtual hosts in the Apache conf file. I normally use mod_proxy as it is fairly easy to configure and extend.&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;&amp;lt;VirtualHost *:80 &amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;    ServerName railoapp.local&lt;br /&gt;    RewriteEngine On&lt;br /&gt;    RewriteOptions Inherit&lt;br /&gt;    RewriteRule ^/(.*)                    http://127.0.0.1:8080/$1 [P,L]&lt;br /&gt;    ProxyPassReverse /                    http://127.0.0.1:8080/&lt;br /&gt;    ProxyPreserveHost on &lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;VirtualHost *:80 &amp;gt;&lt;br /&gt;    ServerName adobeapp.local&lt;br /&gt;    RewriteEngine On&lt;br /&gt;    RewriteOptions Inherit&lt;br /&gt;    RewriteRule ^/(.*)                    http://127.0.0.1:8080/$1 [P,L]&lt;br /&gt;    ProxyPassReverse /                    http://127.0.0.1:8080/&lt;br /&gt;    ProxyPreserveHost on &lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you are running JBoss server instance on another port you'd need to change the port number in the rewrite directives.&lt;/p&gt;
&lt;p&gt;Restart Apache.&lt;/p&gt;
&lt;h2&gt;Deploy Adobe ColdFusion WAR &lt;/h2&gt;
&lt;p&gt;The next thing to do is to deploy ColdFusion WAR file. I have the exploded WAR file and created a folder called &lt;strong&gt;cfusion.war&lt;/strong&gt; in the deploy directory the &lt;strong&gt;cfapps&lt;/strong&gt; JBoss server. In &lt;strong&gt;/cfusion.war/WEB-INF&lt;/strong&gt;, create a file called &lt;strong&gt;jboss-web.xml&lt;/strong&gt; with the following content:&lt;/p&gt;
&lt;p class="monospace"&gt;&amp;lt;jboss-web&amp;gt;&lt;br /&gt;    &amp;lt;context-root&amp;gt;/&amp;lt;/context-root&amp;gt;&lt;br /&gt;    &amp;lt;virtual-host&amp;gt;adobeapp.local&amp;lt;/virtual-host&amp;gt;&lt;br /&gt;&amp;lt;/jboss-web&amp;gt;&lt;/p&gt;
&lt;h2&gt;Deploy Railo ColdFusion WAR &lt;/h2&gt;
&lt;p&gt;Now deploy Railo WAR file. I have the
exploded WAR file and created a folder called &lt;strong&gt;railo.war&lt;/strong&gt; in the deploy
directory the &lt;strong&gt;cfapps&lt;/strong&gt; JBoss server. In the &lt;strong&gt;/railo.war/WEB-INF&lt;/strong&gt;, create a file called &lt;strong&gt;jboss-web.xml&lt;/strong&gt; with the following content:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;&amp;lt;jboss-web&amp;gt;&lt;br /&gt;
    &amp;lt;context-root&amp;gt;/&amp;lt;/context-root&amp;gt;&lt;br /&gt;
    &amp;lt;virtual-host&amp;gt;railoapp.local&amp;lt;/virtual-host&amp;gt;&lt;br /&gt;
&amp;lt;/jboss-web&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There is a known issue at the moment that if you deploy Railo as a WAR file, there are some conflicts with a few libraries. To avoid these conflicts, &lt;a href="http://coldshen.com/blog/index.cfm/2008/8/2/Running-Railo-3-beta-on-JBoss-5"&gt;you need to remove&lt;/a&gt; the following JAR files from the Railo &lt;strong&gt;/railo.war/WEB-INF/lib&lt;/strong&gt; folder&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;apache-xml-xerces.jar&lt;/li&gt;
&lt;li&gt;xml-apis.jar&lt;/li&gt;
&lt;li&gt;ss_css2.jar&lt;/li&gt;
&lt;li&gt;tagsoup.jar&lt;/li&gt;
&lt;li&gt;serializer.jar&lt;/li&gt;
&lt;li&gt;w3c-dom.jar&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That should do. &lt;/p&gt;
&lt;p&gt;Start the JBoss server and look at the log output. You should see both AdobeCF and RailoCF start in the / context.&lt;/p&gt;
&lt;p&gt;Place a file that dumps the server scope in &lt;strong&gt;cfusion.war&lt;/strong&gt; and &lt;strong&gt;railo.war&lt;/strong&gt; folders. Browse to &lt;strong&gt;http://railoapp.local/&lt;/strong&gt; you should see the server dump for RailoCF. Browsing to &lt;strong&gt;http://adobeapp.local/&lt;/strong&gt; should show you the server dump for Adobe CF.&lt;/p&gt;
&lt;h2&gt;Sharing Files Between AdobeCF and RailoCF&lt;/h2&gt;
&lt;p&gt;Since the basic idea was to make changes in the code and test in both AdobeCF and RailoCF, I checked out my application from source control twice -- once into the webroot of cfusion.war and once into the webroot of railo.war. However, this was quite irritating and problemmatic as I has having to commit/checkout/update in two separate folders.&lt;/p&gt;
&lt;p&gt;So I decided to remove the source code from cfusion.war and created symbolic links in &lt;strong&gt;cfusion.war&lt;/strong&gt; folder to all the relevant folders in &lt;strong&gt;railo.war&lt;/strong&gt; folder. So when I view the filesystem of &lt;strong&gt;cfusion.war&lt;/strong&gt; I could see the relevant directories in the webroot.&lt;/p&gt;
&lt;p&gt;However, JBoss Tomcat by default does not allow browsing to folders and files in symbolic links in the web context. &lt;/p&gt;
&lt;p&gt;You need explicity tell it do so. To do this, you need to change &lt;strong&gt;jbossweb.sar/context.xml&lt;/strong&gt;.  Add &lt;span class="monospace"&gt;allowLinking="true"&lt;/span&gt; to the root &lt;span class="monospace"&gt;Context&lt;/span&gt; node. This is what my Context.xml looks like:&lt;/p&gt;
&lt;p&gt;&lt;span class="monospace"&gt;&amp;lt;Context cookies="true" crossContext="true" allowLinking="true"&amp;gt;&lt;br /&gt;   &amp;lt;Manager pathname="SESSIONS.ser" /&amp;gt;&lt;br /&gt;   &amp;lt;Manager pathname="" /&amp;gt;&lt;br /&gt;   &amp;lt;InstanceListener&amp;gt;org.jboss.web.tomcat.security.RunAsListener&amp;lt;/InstanceListener&amp;gt;&lt;br /&gt;&amp;lt;/Context&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And that did it. &lt;/p&gt;
&lt;p&gt;Restart the JBoss server. And now it should expose the linked folders as a regular folders in the webroot and you can browse to them.&lt;/p&gt;
&lt;p&gt;It definitely made my development much easier as this setup provides an identical testing ground for my application (both apps running in the root context) and reduces logistical hassels like checking-out/checking-in files at two different locations.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/c4r88KFhmvs" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/c4r88KFhmvs/running-railo-and-adobe-coldfusion-on-the-same-context-root-in-jboss</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/running-railo-and-adobe-coldfusion-on-the-same-context-root-in-jboss</guid>
         <category>ColdFusion</category><category>Railo</category><category>JBoss</category>
         <pubDate>Tue, 26 May 2009 23:50:55 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/running-railo-and-adobe-coldfusion-on-the-same-context-root-in-jboss</feedburner:origLink></item> 
      <item>
         <title>Moving to Railo - Test compile-time errors quickly</title>
         <description>&lt;p&gt;Over the last few weeks I've been working quite intensively with Railo. And over that period I've been migrating a lot of my current applications to Railo. The migration process has been relatively painless and that is really impressive. There are two things to look out for: compile-time errors and runtime errors in the code that you migrate.&lt;/p&gt;
&lt;p&gt;Railo makes it really easy to uncover compile-time errors. It provides a setting in the Web Administrator that goes off and compiles all the cfm and cfc pages in your application. Imagine if your application has a lot of cfm and cfc files. How complex would it be to test if all of them work ok or not.&lt;/p&gt;
&lt;p&gt;Checking for compile-time errors is important as Railo is slightly less forgiving than the Adobe ColdFusion compiler. The Railo compiler verifies tags, attributes, arguments in a little more strict manner -- which I think is a positive thing. Not only does it help to keep the code sharp, but also leads to gains in performance.&lt;/p&gt;
&lt;p&gt;So to test for compile-time errors, without having to physically click through each cfm page in your application or instantiating each cfc, you can simply setup a mapping in the Server Administrator to the folder where your application lives. Once the mapping is setup, simply go to edit the mapping and hit the compile button. Railo goes through all the cfm and cfc files, compiles them, and reports on any errors it finds.&lt;/p&gt;
&lt;p&gt;Here are some screenshots of what needs to be done to check for compile errors:&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/RailoCompileTest-1-20090527-092742.png" alt="Railo Compile Test 1" width="601" height="273" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/RailoCompileTest-2-20090527-093018.png" alt="Railo Compile Test 2" width="601" height="231" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/assets/content//images/RailoCompileTest-3-20090527-093122.png" alt="Railo Compile Test 3" width="600" height="316" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/d_cS3jEpQNM" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/d_cS3jEpQNM/moving-to-railo-testing-compile-time-errors-quickly</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/moving-to-railo-testing-compile-time-errors-quickly</guid>
         <category>ColdFusion</category><category>Railo</category><category>JBoss</category>
         <pubDate>Tue, 26 May 2009 20:32:04 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/moving-to-railo-testing-compile-time-errors-quickly</feedburner:origLink></item> 
      <item>
         <title>Turn off directory listing on GlassFish server to prevent browsing of folders</title>
         <description>&lt;p&gt;By default the directory listing is turned on on GlassFish application server. This is great while developing as one can see list of files and folders in one's web application.&lt;/p&gt;
&lt;p&gt;However, on a live web application, the need for greater security necessitates that directory listing is turned off so that users are prevented from browsing files and folders in one's webroot.&lt;/p&gt;
&lt;p&gt;To turn off directory listing is a two-step process. First, set the "listing" node to "false" in config/default-web.xml file. And second, redeploy the web application in question. Just changing the default-web.xml won't suffice. Once the web application is redeployed, the directory listing is turned off.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/indiver/~4/BP3M96g4UPY" height="1" width="1"/&gt;</description>
         <link>http://feedproxy.google.com/~r/indiver/~3/BP3M96g4UPY/turn-off-directory-listing-on-glassfish-server-to-prevent-browsing-of-folders</link>
         <guid isPermaLink="false">http://nagpals.com/blog/post.cfm/turn-off-directory-listing-on-glassfish-server-to-prevent-browsing-of-folders</guid>
         <category>GlassFish</category><category>Apache</category>
         <pubDate>Mon, 10 Nov 2008 06:52:00 GMT</pubDate>
      <feedburner:origLink>http://nagpals.com/blog/post.cfm/turn-off-directory-listing-on-glassfish-server-to-prevent-browsing-of-folders</feedburner:origLink></item> 
   </channel>
</rss>
