Tapestry
  1. Tapestry
  2. TAPESTRY-1636

Template reloading in Tomcat doesn't work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.8
    • Component/s: Framework
    • Labels:
      None

      Description

      Page class reloading works just fine, but template reloading doesn't.

      I'm using the tomcat:run goal without any special tomcat configuration.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        I've verified that this occurs (its easy enough with the Maven tomcat:run goal) but I'm at a loss as to why it fails to pick up changes.

        I've verified that changes to static resources are visible.

        This appears to be an issue with how Tomcat reports the date time modified of files in the context.

        Show
        Howard M. Lewis Ship added a comment - I've verified that this occurs (its easy enough with the Maven tomcat:run goal) but I'm at a loss as to why it fails to pick up changes. I've verified that changes to static resources are visible. This appears to be an issue with how Tomcat reports the date time modified of files in the context.
        Hide
        Howard M. Lewis Ship added a comment -

        Doing some investigation ...

        I added a tiny bit of logging to the ComponentTemplateSource service. What I've seen is that the URLs for resources are a bit odd.

        Template: jndi:/localhost/t5examples/Start.tml
        Template: jndi:/localhost/t5examples/NewAccount.tml
        Template: jar:file:/Users/Howard/.m2/repository/org/apache/tapestry/tapestry-core/5.0.8-SNAPSHOT/tapestry-core-5.0.8-SNAPSHOT.jar!/org/apache/tapestry/corelib/components/BeanEditForm.tml
        Template: jar:file:/Users/Howard/.m2/repository/org/apache/tapestry/tapestry-core/5.0.8-SNAPSHOT/tapestry-core-5.0.8-SNAPSHOT.jar!/org/apache/tapestry/corelib/components/BeanEditor.tml

        Tapestry only normally allows resources with a "file:" prefix to be tracked. I need to do some research on what this "jndi:" prefix really means.

        Show
        Howard M. Lewis Ship added a comment - Doing some investigation ... I added a tiny bit of logging to the ComponentTemplateSource service. What I've seen is that the URLs for resources are a bit odd. Template: jndi:/localhost/t5examples/Start.tml Template: jndi:/localhost/t5examples/NewAccount.tml Template: jar: file:/Users/Howard/.m2/repository/org/apache/tapestry/tapestry-core/5.0.8-SNAPSHOT/tapestry-core-5.0.8-SNAPSHOT.jar!/org/apache/tapestry/corelib/components/BeanEditForm.tml Template: jar: file:/Users/Howard/.m2/repository/org/apache/tapestry/tapestry-core/5.0.8-SNAPSHOT/tapestry-core-5.0.8-SNAPSHOT.jar!/org/apache/tapestry/corelib/components/BeanEditor.tml Tapestry only normally allows resources with a "file:" prefix to be tracked. I need to do some research on what this "jndi:" prefix really means.
        Hide
        Howard M. Lewis Ship added a comment -

        Things are looking good, I'm using ServletContext.getRealPath() to try and convert paths in the context into File instances, which should get around the jndi: stuff.

        Show
        Howard M. Lewis Ship added a comment - Things are looking good, I'm using ServletContext.getRealPath() to try and convert paths in the context into File instances, which should get around the jndi: stuff.
        Hide
        Howard M. Lewis Ship added a comment -

        Looking good, at least for using Maven tomcat:run.

        Show
        Howard M. Lewis Ship added a comment - Looking good, at least for using Maven tomcat:run.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Hugo Palma
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development