javalin / javalin

A simple and modern Java and Kotlin web framework

Home Page:https://javalin.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a substitute for 5.x Javalin.createStandalone() in version 6.x?

CycleMost opened this issue · comments

I'm using Javalin.createStandalone() in version 5.x to create a servlet for Wildfly. How is this done with version 6? I've tried using Javalin.create() instead, but it isn't able to load in Wildfly, even if I leave out the Jetty dependencies from the .war file.

Thanks

You should be able to create Javalin, without actually starting it with a start():

and get servlet via app.javalinServlet().

Ok, this worked. The reason the servlet couldn't load in Wildfly is that Javalin still has a dependency on jetty-http, even when running as a servlet. I was excluding all jetty dependencies from the .war, but I had to change that to include only jetty-http (for MimeTypes class). Then it works.

Thanks!

This should be resolved in the next release, there was an unused import pulling in this dependency.