Archive for: January, 2012

Enabling Tomcat NIO Connector with Grails 2.0

Enabling Tomcat NIO Connector with Grails 2.0

At dozens of different sources, even in Graeme Rocher’s corresponding Jira ticket, it says that you need to put grails.tomcat.nio=true into your Config.groovy file. I believed that, too, and it drove me nuts to see that the org.apache.coyote.http11.Http11NioProtocol class wasn’t even instantiated.

I had to review the commit logs to figure out that the property should actually be in the BuildConfig.groovy file.

Now I finally got the log messages that I expected to see…

| Loading Grails 2.0.0
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Running Grails application
| Enabling Tomcat NIO connector
http11.Http11NioProtocol Initializing ProtocolHandler ["http-nio-8080"]
| Server running. Browse to http://localhost:8080/...