Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1336

Changed classes do not reload under Tomcat

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.2
    • 5.3
    • tapestry-ioc
    • None

    Description

      I am using eclipse, with maven plugin m2eclipse.

      When I launch tomcat with tomcat-maven-plugin (V 1.1), pages don't reload when I modify them. I have to restart my web server to see the changes.

      What I noticed when I modify a page :

      • Tapestry is notified of a modification of the class file
      • It flushes the old page instance and tries to reload the class file
      • It in fact reloads the old version of the file -> it seems that Tomcat classloader gives the old class file inputStream in getResourceAsStream methods

      I made a modification in ClassFactoryClassPool to get a clean new InputStream from the classFile, that fixed my issue, now pages are well reloaded when I modify them under Tomcat.

      Attachments

        1. patch_tomcat_reload.txt
          2 kB
          Denis Delangle

        Activity

          People

            hlship Howard Lewis Ship
            denis.delangle Denis Delangle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: