title: What maven-jetty-plugin 8 configuration allows reloading of JSP files when they change?
body: <p>Consider a default webapp configuration in Maven (for the test case I used struts2-blank-archetype from <a href="https://repository.apache.org/content/groups/public/archetype-catalog.xml" rel="nofollow">https://repository.apache.org/content/groups/public/archetype-catalog.xml</a> ).</p>
  
  <p>This archetype comes with maven jetty plugin's version 6. With the configuration below, if I <strong>change a jsp under /src/main/webapp/WEB-INF/</strong> and save it, refreshing the browser will show these changes.</p>
  
  <blockquote>
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
              &lt;version&gt;6.1.21&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;scanIntervalSeconds&gt;10&lt;/scanIntervalSeconds&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
    
    <p>(notice that one doesn't even need to put the scantarget element, as we don't want a complete container reload when you just change a jsp).</p>
  </blockquote>
  
  <p>However, <strong>the exact same configuration of version 8 of the plugin</strong> (see below) does not work. If I change the same jsp, refreshing the browser will show the old JSP contents. Only by stopping and starting the server will I see the changes.</p>
  
  <blockquote>
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
               &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
               &lt;version&gt;8.1.7.v20120910&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;scanIntervalSeconds&gt;10&lt;/scanIntervalSeconds&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  </blockquote>
  
  <p>What is wrong with this configuration, and what <strong>configuration would produce the same results in version 8</strong> (ie, auto-refreshing the jsp contents without restarting the server)?</p>
  
  <p><strong>EDIT:</strong>
  Here's a 2 minute test you can try:</p>
  
  <ol>
  <li>Create archetype struts2-archetype-convention ("mvn archetype:generate", 308, package war).</li>
  <li>Edit the pom and set the jetty plugin configuration to the one listed above (version 6)</li>
  <li>mvn jetty:run</li>
  <li>Open the browser on "http://localhost:8080"</li>
  <li>See "Languages" on the page</li>
  <li>Edit /src/main/webapp/WEB-INF/content/hello.jsp - change "Languages" for something else. Save.</li>
  <li>Refresh the browser and see the change.</li>
  <li>Repeat the steps. On step 2, change the artifactId and version to the ones listed above (version 8)</li>
  <li>Confirm the webpage does not change upon refresh after you perform the change in the JSP.</li>
  </ol>