Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Binding servlet handler. JettyExample | parkergordon.io
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]) = {
server.setHandler(handler)
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
You can’t perform that action at this time.