grails chain does a redirect

Wow, should've known this, like 2 years ago...
Anyway, I call chain in many of my controllers as a way to pass a model from one controller action, to the other.  I did not know that grails is actually storing the model in flash and doing a http redirect to the next action.
I should probably be using the "forward" for what I need to do.

and the default search field in solr is ...

Spent a little to much time finding this out.  Just try doing a search "What is the default search field in solr"
Anyway, out of the box, it's a field called "text"
You can change it and look this in the schema.xml file of your solr instance:

iui gotcha, don't forget the target

So, spent way too much time on this today.


I had a button that is in my menu bar that shows a screen when the button is pressed.  On one particular screen, it just would not appear.

After checking and rechecking the dom structure, I figured out that when I invoked this particular screen, I neglected to set a target of "_self" to the anchor.

don't use variables in resources with eclipse:eclipse goal

SO, I tried using the nifty " mvn -Dwtpversion=1.5 eclipse:eclipse" and got a big ugly error:

[INFO] Cant canonicalize system path: {0}

Embedded error: The filename, directory name, or volume label syntax is incorrec
[INFO] ------------------------------------------------------------------------

The root cause of the problem is that you can not use any variables in the placeholders of your resources in your pom.  This is what I had that gave me problems.  You can't do this with this plugin:

I just hit the "classifier"

So, trying to mavenize our large java-based projects.  I found a jar that I needed to add to our project that had a different structure as I was familiar with.

Here was the jar


I userstood the groupId and the artifact, but what is the version?  Do I use 1.5.8 or 1.5.8-all?

Neither one would work.  Enter the "classifier"  Here's how the final pom addition came out:

post registration redirect

For spotmouth, the user management is in Drupal.  When a user registers, they are by default redirected to the Drupal front page.  For spotmouth, this automatically redirects the user to the grails portion of the app, so a) user does not see the "check email" message that drupal provides.
What I wanted to do was direct the users when they register to a thank you page.  This was easy, I just created my "thank you" page in the CMS and installed the "Rules" modules.
I created a new rule for when users are created, and did a page redirect to my Thank you page.

custom jars/plugins for solr

So using the library spatial-solr-1.0-RC3.jar to provide geolocation searches for
Since I had to create the 2nd solr instance, I needed to move the port of one of them.  When I started this 2nd instance up, I got a ClassNotFoundException"
I had forgotten that I dropped this jar into the exploded war file, and because I changed the port, the exploded war needed to be re-exploded.
I decided rather than mucking with war files, I would just add my jar file to example/solr/lib where example is the name of your app.

Apache solr and drupal gotcha!

I setup a 2nd solr instance for for my drupal instance.  Anytime I tried to run cron.php to get drupal to index my content, I got an error:
Cron run exceeded the time limit and was aborted.
No content was ever indexed.
The problem was that I had a Drupal page that contained php content (do redirect to the application). Once I changed it to use a different input filter than PHP, the cron job functioned perfectly.

Enabling AJP with grails local dev environment

I am implementing a site (spotmouth) that is using grails and Drupal.  Locally for my drupal stuff, I am running the excellent XAMPP.
I wanted my local grails app behind apache so it would be a lot closer to what my production configuration would be like.  It turns out that by adding the following file to my Grails app, it will enable the AJP port for tomcat.
Copy the _Events.groovy  file (below) to your scripts folder in your grails app.   Of course, don't forget your httpd.conf files to proxy your app.


If you need to do mobile development, get familiar with this handy XML file called WURFL Wireless Universal Resource File


More info at


I am using it at to detect mobile devices and redirect them to the mobile portion of the site.


Syndicate content