https://kotlinlang.org logo
#http4k
Title
# http4k
d

dave

11/23/2018, 1:01 PM
@David Hamilton you can easily mount an http4k app alongside another servlet using the HttpHandler.asServlet() extension function. If you look at the
Jetty
object you can see the pattern for how this can be done using an embedded Jetty backend
d

David Hamilton

11/23/2018, 3:26 PM
Thanks for the reply, but I think what I'm trying to do is the other way around - i.e. wrap a HTTP4K handler around a third-party servlet.
d

dave

11/23/2018, 3:28 PM
we don't have a way to do that - the methods don't exist to create the marshall the request from http4k -> Servlet. you could use the example in asServlet to write the reverse
d

David Hamilton

11/23/2018, 3:37 PM
Thank you - yes, I realise that I'm swimming against the tide here: it's all telling me that there are better approaches!