4 Replies Latest reply on Feb 12, 2015 10:18 AM by karthik-vasishta.ramesh

    wildfly hot deploy of static content

    shadogray

      during work on static content (HTML and JS files) I found, that wildfly seems to stop reloading the changed files after 2 or 3 changes.

      I am working on a larger project with multiple wars in an ear, so the redeployment is rather slow.

       

      Is this some caching configuration that kicks in refusing to reload the modified files?

       

      Regards,

      Thomas

        • 1. Re: wildfly hot deploy of static content
          ctomc

          What exact version of WildFly and JDK are you using? Also did you try with 8.1.0.CR1 or latest nightly?

           

          I would recommend you to bypass redeployment if you are working lots on static content and just configure file handler to serve your custom path directly from disk.

           

          just add handler like this in undertow subsystem

           

          <file name="static-content" path="/path/on/disk/for/static/content" />

          and then under host you can just add it like this:

           

            <location name="/static" handler="static-content" />

          • 2. Re: wildfly hot deploy of static content
            hai_feng

            Hi Fruhbeck

            method one:

            WildFly\standalone\configuration\standalone.xml

            find

            <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only" use-listener-encoding="true">

                            <jsp-config/>

                        </servlet-container>

            add    <configuration>
                            <jsp-configuration development="true"/>
                        </configuration>

            but it is useless.

             

            method two:

             

            For standalone deployment, go to standalone/configuration directory and open standalone.xml. Look for the line below.

                  

            <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">

                        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>

            </subsystem>

             

            Add this param to enable hot deploy  auto-deploy-exploded="true"

            Changes are as below:

                    <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                        <deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir"    auto-deploy-exploded="true" deployment-timeout="60"/>

                    </subsystem>


            you can try it.

            • 3. Re: wildfly hot deploy of static content
              shadogray

              this will cause redeployment, AFAICS, so too expensive for larger applications

              Thanks

              • 4. Re: wildfly hot deploy of static content
                karthik-vasishta.ramesh

                Hi Tomaz,

                Thanks a lot! Your suggestion on bypassing hot deploy worked. I'm using Wildfly 8.1.0.Final and JDK 8.

                I came to know that the issue with hot deployment is fixed in 8.2. But is there a patch for undertow that I can apply that will fix the issue in 8.1?

                Thanks in advance for the help!