Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-63

webapp.resource.loader.extension property that gives a mandatory extension to add to resource names

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 1.3
    • 1.3
    • VelocityView
    • None

    Description

      This is another proposal.

      A new "webapp.resource.loader.extension" property that gives a mandatory extension meant to be added to resource names if not already present.

      The typical use-case is when you want to name your templates like "foo.html.vtl" or "foo.js.vtl", without the ".vtl" to be visible in the URLs.
      It is a quite convenient convention since it allows one to store templates and regular files in the same directory tree.

      Needless to say, it is fully backwards compatible.

      This new extension could also be added to other resource loaders, but it would be more complex to factorize, and use-cases are less clear.

      Attachments

        1. WebappLoader.patch
          4 kB
          Claude Brisson
        2. TemplateNameFilter.java
          8 kB
          Claude Brisson

        Activity

          People

            Unassigned Unassigned
            cbrisson Claude Brisson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: