Plugins You can find out about all the publicly available Grails plugins.

Jetty Plugin

  • Tags: server
  • Latest: 3.0.0
  • Last Updated: 19 May 2014
  • Grails version: 2.3.7 > *
3 votes
compile ":jetty:3.0.0"

 Documentation  Source  Issues


Makes Jetty the development time container for Grails


Remove the dependency in BuildConfig.groovy for the Tomcat plugin and add this in its place:

build ':jetty:2.0.3'


Makes Jetty 7.6.0 the development time container for Grails


info 'org.eclipse.jetty'

to your application's Config.groovy log4j section to see the Jetty information and errors.

Multiple applications

You can run additional applications in WAR format by adding this code to your application's scripts/_Events.groovy:

import org.eclipse.jetty.server.Server
import org.eclipse.jetty.server.handler.ContextHandlerCollection
import org.eclipse.jetty.webapp.WebAppContext
import org.eclipse.jetty.server.Handler

eventConfigureJetty = { Server server -> try { // add as many wars to this map as you want def wars = [other: "/path/to/otherapplication.war"]

def handlers = [server.handler] wars.each { context, filePath -> handlers << new WebAppContext(filePath, "/$context") }

server.handler = new ContextHandlerCollection(handlers: handlers as Handler[]) } catch (e) { e.printStackTrace() } }