2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

how to set default my war file as default war file in wildfly server?

My requirement is i have a war file named mywar.war. Now i want to make it as default war file loader means if i type only ip address it should open mywar.war files home page. Not wildfly servers home page. To do that what i need to do. Please suggest.
userimage
To make the war file as default war file you need to configure your stanalone.xml as below:

 <server name="default-server">
    <http-listener name="default" socket-binding="http"/>
    <host name="default-host" alias="localhost" default-web-module="mywar.war">
        <filter-ref name="server-header"/>
        <filter-ref name="x-powered-by-header"/>
    </host>
</server>


Only this configuration will work for you. Make sure you have changed the default port number to 80.
Answer is