Christoph Hartmann on April 16th, 2009

In most cases a Grails application uses a database to store its content. Fortunately Grails is tightly coupled with GORM to ease the use. Since Grails distinguish between different deployment environments, it uses a special configuration for development and production. Therefore you have to think of a database in production environment while you don not [...]

Continue reading about Deploy a Grails Application into Glassfish

Christoph Hartmann on December 13th, 2008

The groovy swing builder is one of Groovys best features. It becomes quite easy to build a gui with the builder. In some cases you may like to add a custom Java swing component to your swing builder. For such cases the swing builder is equipped with the widget() method. The following code uses the [...]

Continue reading about Groovy Swing Builder + JTabbedPane

Christoph Hartmann on November 15th, 2008

I set up an mobile application that sends data via a REST based interface to a Grails-based server. Unfortunately J2ME does not support all HTTP methods. To overcome this weakness we have to emulate the methods PUT and DELETE. Like Rails just did this by adding a “_method=PUT” parameter to the query URL, we will [...]

Continue reading about J2ME, REST and Grails

Christoph Hartmann on October 8th, 2008

For my current grails project I use the Spring Security Plugin (formerly Acegi Security) to secure my views and services. A tutorial at the Grails site gives a great overview how to install the grails plugin.
Right after installation I faced some issues:
Secure your Rest Services
This sounds quite easy due to a simple switch within the [...]

Continue reading about Grails Spring Security

Christoph Hartmann on October 7th, 2008

Im Rahmen des Seminars Meta-Programmierung haben Lars Blumberg, Arvid Heise und ich eine Ausarbeitung erstellt, welche die Metaprogrammierung von Groovy untersucht.
Der Name der Programmiersprache ist Programm. Dass Groovy als noch junge Sprache viele neue und interessante Sprachkonzepte mitbringt, möchten wir im ersten Teil dieses Papers aufzeigen. Ein weiteres Highlight des ersten Kapitels ist vielleicht die [...]

Continue reading about Groovy Meta Programmierung

Christoph Hartmann on September 11th, 2008

Java Iteration Example

import java.util.Date;
public class Foo {
public static void main(String[] args) {
int start = 1;
int summe = 0;
for (int i = start; i <= 5; i++) {

Continue reading about Groovy Programming Examples

Christoph Hartmann on August 11th, 2008

Check out how easy the integration of OpenID into Grails is:
1. Create a new grails application: grails create-app openID
2. Change into directory: cd openID
3. Install Plugin: grails install-plugin openid
4. Create a new controller: grails create-controller User
5. Create logon.gsp at grails-app/views/user
6. Add the following lines of code
<openid:css />
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″/>
<meta name=”layout” content=”main” />
<openid:css />
<div [...]

Continue reading about 10 Steps to Integrate OpenID into Grails

Christoph Hartmann on April 1st, 2008

The Groovy documentation gives the first hints about how to use the Groovy XML Parser. This post describes how to read an XML file into a groovy class instance. To check for a valid input document advanced XML programs require XSDs for a formal description. Of course the XML processing task becomes more difficult with [...]

Continue reading about How to use Groovy XML Parser with namespaces

Christoph Hartmann on March 31st, 2008

Acording to the official Groovy web site Groovy is “an agile dynamic language for the Java Platform with many features that are inspired by languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.”
Besides all marketing I used Groovy for quite some time and I think it’s a great [...]

Continue reading about Install the Groovy Eclipse Plugin