Embedding Jetty in Scala

December 24, 2013

Reference table

Version API Embedded servlet Embedded webapp
9 JavaDoc EmbeddedServlet.scala EmbeddedWebapp.scala
8 JavaDoc EmbeddedServlet.scala EmbeddedWebapp.scala
7 JavaDoc EmbeddedServlet.scala EmbeddedWebapp.scala
6 JavaDoc EmbeddedServlet.scala EmbeddedWebapp.scala

See also: What version do I use?

J2EE reference

API docs

Example usage

Embedded servlet:

$ cd <jetty-X>
$ sbt
> console
scala> val ej = new EmbeddedServlet()
scala> ej.start()
scala> ej.stop()

Embedded webapp:

$ cd <jetty-X>
$ sbt
> console
scala> val ej = new EmbeddedWebapp()
scala> ej.start()
scala> ej.stop()