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

1.4.0 introduced a couple of bugs. The good news is we’ve fixed them in 1.4.1.


GitHub user ShikaSD has contributed a lot of new config options and features:

Config options

val app = Javalin.create().apply {
    defaultContentType(string) // set a default content-type for responses
    defaultCharacterEncoding(string) // set a default character-encoding for responses
    maxBodySizeForRequestCache(long) // set max body size for request cache
    disableRequestCache() // disable request caching

Other features

  • Route declarations can now accept regex patterns (app.get("/:param/[0-9]+/") { ... })


  • ctx.redirect(path, status) used to ignore status-code, always using 302. This has been fixed.
  • CacheRequestWrapper used to not provide access to the InputStream for requests if Transfer-Encoding was chunked. This has been fixed.
  • Dynamic GZIP only worked for ctx.result(string) before, now it also works for ctx.result(stream)