Monthly Archives: November 2008

A Simple Grails Controller for File Management

Using Grails as a CMS, often times you want your users to add and remove files to a page similar to the way assets are attached to a page in the Confluence Wiki. I recently had to write a controller to handle files upload and download, and thought it might be interesting to share this since it is done so often in the Grails world.


Download the controller : FileResourceController.groovy
Download the view : list.gsp
Download complete sample app :
( to run: install grails. Invoke grails run-app. Navigate to http://localhost:8080 )

Continue reading

MacPorts Portfile for Grails 1.0.4

Grails has been updated to 1.0.4. It will be available in the next revision of Macports.

To Install Grails on the Mac, do as follows.

1. Install MacPorts

2. Call

sudo port install grails

3. Open a terminal window and edit your profile file

type sudo nano .profile

change it so it looks like this,

export PATH="$PATH:/opt/local/bin:/opt/local/sbin:/Users/tlin/grails/bin"
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
export GRAILS_HOME="/opt/local/share/java/grails"

4. Save.

Using Groovy to decypher adolescent Internet use

I’ve been meaning to write about my experiences using the Groovy dynamic language in educational research for a while, but haven’t found time to do so due to a grueling work schedule and burnout.

This post talks about how the Groovy dynamic language is used in an educational research setting, helping us better understand the way in which Internet use plays a role in adolescent development.
Continue reading