Hi all! I'm new to Ktor and I'd need some help on how to generate a .war file from my Ktor webapp? Though I created a .war using Gretty plugin but the artifact has strange folder structure. I copied the .war on a Tomcat but can't see anything in the browser.
m
mp
07/05/2019, 5:36 PM
Not an answer to your immediate question, I know... but if you have the option of skipping tomcat & friends entirely and just starting ktor via a main method you'll probably be happier overall. Simpler local dev, more predictable production deployment.
z
zsoltkiss
07/08/2019, 9:32 AM
Hi Marshall, thanks for your help. You mean 'skipping' that I should not use Tomcat at all? It might be a solution, yes. Let me explain my original problem I have to solve... I built a Ktor web app and currently I run it from its .jar file using java command. But my customer needs a "public" images directory somewhere, where they will be able to put images into and the web app should reach these pictures. I don't know how to configure Ktor embedded server to see outside of its .jar file and reach images from an external directory... That's why I thought a standard web app directory structure on a Tomcat (or any web server) might be a solution. I don't stick to Tomcat at all if there is a solution to my problem using only Ktor and its embedded server.