javathorntail

How do I serve static content with thorntail


I have a new project created using the Thorntail Project Generator. I want to serve a small amount of static files such as html, images etc

How can I do this?


Solution

  • Assuming you build your project with Maven, you need to:

    I created a small example project here: https://github.com/rhoar-qe/thorntail-test-suite/tree/master/javaee/static-content

    Note that Thorntail is based on WildFly, and so includes the same servlet container: Undertow. If you have more elaborate needs, you can find articles about serving static content with servlet in general and Undertow in particular everywhere on the web, including here on StackOverflow.