Skip to content

Instantly share code, notes, and snippets.

Last active September 26, 2016 05:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Binding servlet handler. JettyExample |
import org.eclipse.jetty.servlet.ServletHandler
object JettyExample {
import CounterServlets._
val incrementRoute = "/increment"
val resetRoute = "/reset"
val handler = new ServletHandler()
def main(args: Array[String]) = {
handler.addServletWithMapping(classOf[IncrementServlet], incrementRoute)
handler.addServletWithMapping(classOf[ResetServlet], resetRoute)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment