Turn off directory listing on GlassFish server to prevent browsing of folders

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.

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.

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.

Finding and configuring JAVA_HOME on Mac OSX

Just so that I don’t forget…

While installing JBoss, I found that I need to setup my JAVA_HOME variable correctly.

After checking a couple of sites, I found the following to be a good way to figure out and setup JAVA_HOME variable on Mac OSX.

In a Terminal window, type

which java

This pointed to “/usr/bin/java“, which was a symbolic link to “/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java“. This in turn was a symbolic link to “/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2“.
So my JAVA_HOME was pointing to “/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home“.

In order to change the JAVA_HOME variable I found a very nice utility called “RCEnvironment” that let me setup all kind of environment variables, including JAVA_HOME, very nicely and easily.

Once I added a JAVA_HOME variable (and pointed it to Java 5 home using RCEnviornment, I logged out and back in again. My JAVA_HOME was setup as I wanted.

Cairngorm extensions from Universal Mind

I just saw that Universal Mind Cairngorm extensions for Flex are now set up on RIAForge (thanks Andrew).

We have been using the UM Cairngorm Extensions at Straker Interactive (where I work) for ZoomFlex since about six months.

One of the features that I really like about the UM extensions is the ability to combine together event-business logic. Given that any real-life application (like ZoomFlex) has quite a few commands, having a separate Command class for each command can become quite overwhelming. The ability to aggregate command logic into context-specific command classes is very useful.

Thomas Burleson, Principal Architect at Universal Mind, and the owner for Google Code repository for the project, introduced me to the extensions.

I’m soon going to start working on redoing the two sample Flex-based Cairngorm applications (RSS Reader and Contacts Manager) I did earlier into Cairngorm with the UM twist.

I’ll post links to these over the next few weeks. In the meantime, if you want to have a play with doing that, feel free to check out these apps from Google Code, and drop me a line (at indy [at] nagpals.com) so that I can set you up to commit changes back in.

Flex, Cairngorm based contact manager on Google Code

Update (7 March 2011): The project has been moved to GitHub.

I’ve just setup a Google Code GitHub project for the sample contact manager application I had written a while back.

The contact manager used Flex, Cairngorm framework and ColdFusion backend.
The original version of the application was based on Cairngorm .99.

I’ve been working on upgrading the application to Cairngorm 2.2.

You can download the application: CFCairngormContacts.zip

Installation instructions are on the Wiki page.
You can also check it out from the Subversion repository.

Installation instructions are at: https://github.com/indynagpal/CFCairngormContacts and you can check out the source code from there as well.

I’ll shortly be posting a link to the Cairngorm 2.2 version of the application.

It’s been an instructive exercise to upgrade the application from Cairngorm 2.0 to 2.2.

I’ll be blogging that in the next couple of days.

ColdFusionMX Syntax Files for PSPad

I use PSPad as the default reader/editor for text files of all kinds. Of late, I’ve been using it for working with ColdFusionMX files as well. It works very nicely!

However, the syntax definition file for ColdFusionMX available on the PSPad site was missing some tags and functions. I’ve updated the syntax definitions and attached the file here.