From the monthly archives:

April 2009

Redirecting javathinking.com to www.javathinking.com

April 18, 2009

I thought it would be a good idea to redirect requests to http://javathinking.com to http://www.javathinking.com and I found out how to do that easily here.
Basically I just needed to add the apache directives:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^javathinking.com
RewriteRule ^(.*)$ http://www.javathinking.com$1 [R=permanent,L]
In ISPConfig this can be done easily through the administration console rather than editing the apache config [...]

Read the full article →

cp with force overwrite

April 13, 2009

I was recently trying to copy a directory over an existing one and kept getting prompted - asking if I wanted to overwrite existing files - even though I was using the force option:
cp -Rf dir1 dir2
I found the answer here - it was caused by an alias forcing the interactive mode.
Quick solution is to [...]

Read the full article →

Error executing script War: No such property: stagingDir for class: _Events

April 1, 2009

While trying out my new Morph Grails hosting account, I installed the morph-deploy plugin and then promptly discovered that ‘grails war’ failed with
Error executing script War: No such property: stagingDir for class: _Events
It turns out this is a known problem with Grails 1.1 and the solution is to delete the _Events.groovy file in
[your home [...]

Read the full article →

Modifying web.xml in Grails

April 1, 2009

I’m trying out Grails application hosting at Mor.ph with a free developer account. To put up a sample application, I wanted to be able to protect the site with basic authentication so that it won’t be accidentally found and played with. So, following the Mor.ph instructions, I needed to modify web.xml to add security constraints [...]

Read the full article →