5

I need to serve static content outside of WAR using the Wildfly application server. I setup

   <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
   </host>
    <handlers>
                <file name="welcome-content" path="c:/Users/admin/web" directory-listing="true"/>
            </handlers>

Everything worked okay but I faced with the routing problem. The application has a html5 history support. When I go to the Url: localhost:8080 everything is okay, my app redirects to /home But when I refresh the page it returns 404 error.

Is there a possibility to define location name as wildcard e.g. /* or how can i solve the problem with single page application?

Roman Lapin
  • 173
  • 1
  • 6

0 Answers0