When using WildFly 8, pointing a browser at localhost:8080
results in the default welcome-content
page being displayed.
I want to change this behaviour so that myapplication.war
is displayed instead.
My standalone.xml
file currently contains the following default configuration:-
<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>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
I have found some posts on the JBossDeveloper Forums that suggest the following:-
<host name="default-host" alias="localhost" default-web-module="name-of-your.war">
Just adding the default-web-module
parameter doesn't seem to work as the welcome-content
page is still displayed.
Removing the location
and filter-ref
items from the host
section stops the welcome-content
page being displayed, but results in an HTTP 404 - Not found
error.
Can anyone tell me how to resolve this please?