Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1555

JSP hot reloading does not work in subdirectories of an exploded deployment on Windows

    XMLWordPrintable

Details

    • Hide

      1. Start JBoss EAP 7 on Windows
      2. Deploy an exploded web application which has a JSP file in subdirectories

      standalone/deployments/
       |-- example.war/
       |    |-- test
       |    |    |-- test.html
       |    |    `-- test.jsp
       |    `-- WEB-INF
       `-- example.war.dodeploy
      

      test.jsp contains the following:

      <%
      out.println("<p>test</p>");
      %>
      

      3. Access "http://localhost:8080/example/test/test.jsp"

      4. Update the content of "standalone/example.war/test/test.jsp" like the following

      <%
      out.println("<p>test</p>");
      out.println("<p>update test</p>");
      %>
      

      5. Access "http://localhost:8080/example/test/test.jsp" but the old content is still returned

      Show
      1. Start JBoss EAP 7 on Windows 2. Deploy an exploded web application which has a JSP file in subdirectories standalone/deployments/ |-- example.war/ | |-- test | | |-- test.html | | `-- test.jsp | `-- WEB-INF `-- example.war.dodeploy test.jsp contains the following: <% out.println( "<p>test</p>" ); %> 3. Access "http://localhost:8080/example/test/test.jsp" 4. Update the content of "standalone/example.war/test/test.jsp" like the following <% out.println( "<p>test</p>" ); out.println( "<p>update test</p>" ); %> 5. Access "http://localhost:8080/example/test/test.jsp" but the old content is still returned

    Description

      JSP changes in the top directory of an exploded deployment can be picked up correctly, but it does not work for the JSP files in subdirectories.

      The file system watcher (XNIO's FileSystemWatcher) is enabled by default and the file change event is triggered correctly. However, the path information of the event contains '\' for the files in subdirectories on Windows. This causes failure to trigger JspServletWrapper.jspFileChanged() because the triggered path is different from the key for the JspServletWrapper. Therefore, the updated JSP file is never recompiled in subdirectories and the old content is still returned until the application is redeployed.

      Attachments

        Issue Links

          Activity

            People

              flaviarnn Flavia Rainone
              rhn-support-mmiura Masafumi Miura
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: