Could ktor be deployed on jboss by packing it into...
# ktor
a
Could ktor be deployed on jboss by packing it into a war file. I add a web.xml by following the document. It works on my local machine but failed on the remote test environment.
1
c
Do you deploy it into root context path? How exactly it is not working?
a
Yeah, I deployed the war into root context path. I use guice to init and load the ktor application. The deployment on jboss don't do anything after the jboss started until I request the index page from browser.
The log
Successfully started the ctuom admin.
didn't print after the jboss starting. When I request the index url on browser. A bunch of bootstrap log printed and finally the
Successfully started the ctuom admin.
showed.
c
So, do you get 404 or something?
or a blank page?
a
Nope. The main problem is that the ktor application in war don't fully start on jboss unless request any url of the ktor application.
c
Why do you think that it's not correct? It is done as designed and is controlled by by load-on-startup web.xml parameter
In the
<servlet>
section with
ServletApplicationEngine
you can specify
<load-on-startup>1</load-on-startup>
👍 1
Otherwise it is lazily initialized by a servlet container
a
Tks, this fixed my problems. 😁
👍🏻 1
c
I believe you are the first one who tried to deploy it into JBoss container. Please let us know is something doesn't work
😅 1
btw, is it old JBoss or Wildfly?
a
Wildfly 8
c
our integrations tests are running inside of Tomcat, Perhaps we can configure it for wildfly one day
a
I hope so. Besides servlet 3.0 don't require the
web.xml
. Could we have a
ServletInitializer
like spring boot.
c
a
That's cool. Thanks for your help.