Important: This news article covers an old version of Javalin (v1.3.0). The current version is v6.1.3.
See the documentation page for up-to-date information.

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

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.