WebSocket improvements

  • Jetty WebSocket module is now bundled with Javalin, there is no need to add it separately. If your project already has the WebSocket dependency declared this can now be removed.
  • Each WsSession now has an ID that you can access via session.id

Multiple Static Files locations

You can now call enableStaticFiles as many times as you want. Each call will add a new handler:

val app = Javalin.create().apply {
    enableStaticFiles("src/test/external/", Location.EXTERNAL)

Handlers will be executed in the order they’re declared.