Default installation of WildFly has only root context specified - for welcome pages
<subsystem xmlns="urn:jboss:domain:undertow:1.2" instance-id="main">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
</filters>
</subsystem>
I have web app available on /webapp and I'd like it to be available from root.
I'm ok with forwarding so I've set it in welcome content so far.
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=/webapp/"/>
I'm not ok with having web app moved from it's context (e.g. directly to root). Also I'd like to avoid referencing app via file system as it is done now.
It should be possible to replace default file handler to have direct forwarding. Is there ~url handler? Maybe it is possible to specify relative address on location or something else? I'm having troubles finding reference docs for these things.
Edit: you see disturbing stuff after you get it posted