1 Reply Latest reply on May 8, 2019 1:43 AM by jaikiran

    Wildfly Welcome-Content

    vx991

      Greeting forum people,

       

      I am running Wildfly 8.2.0.Final in a Docker container. I have deployed a simple Java web application to the root context. Most of the time everything works as expected. There are times, however, when I go to localhost:8080/ rather than seeing my application I get the Wildfly welcome page. A little later, my application is back. I'm guessing that something is going on with my app that makes it temporarily unavailable so Wildfly displays it's welcome content.

       

      So my questions...

      1. Under what conditions does Wildfly serve the welcome-content rather than an application deployed to the same context?
      2. If there is a problem with my application, as i suspect, why do I see the Wildfly welcome screen instead of an error, (like a 503 or something)?
      3. If I have an application deployed to /, should I remove the welcome-content? And if so, would I then get a error response instead of welcome page when my application is flaking out.

       

      I am deploying my application via a Dockerfile,  ADD myapp.war /opt/jboss/wildfly/standalone/deployments/

      Here is my configuration,

       

      <subsystem xmlns="urn:jboss:domain:undertow:1.2">

          <buffer-cache name="default"/>

          <server name="default-server">

              <http-listener name="default" socket-binding="http"/>

              <host name="default-host" alias="localhost" default-web-module="myapp.war">

                  <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>

       

      Thanks for helping to increase my understanding...

        • 1. Re: Wildfly Welcome-Content
          jaikiran

          Are you fronting WildFly with some other webserver/loadbalancer (Apache HTTP for example)? Maybe that's playing a role here and redirecting the request to a different host or application?