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

Templates vs. static content should be resolvable via file naming pattern

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • GenericTools
    • None
    • all

    Description

      The VelocityViewServlet.getTemplate() method should append ".vtl"
      to the URI by default (and only handle .vtl files in its servlet-mapping
      clause).

      So, a request http://www.foo.com/bar.html would map :
      1. to a template bar.html.vtl if found
      2. to a regular html file bar.html otherwise

      Beyond the first basic samples, any webapp will need such a behaviour.
      So all application designers will have to subclass VelocityViewServlet to do it.

      Why not then incorporate it by default ? It looks rather important to me. Having
      to subclass the VelocityViewServlet for each and every project is really silly.

      Since there is a backward compatibility issue, one could trigger the behaviour with
      a configuration flag and wait for the tools 2.0 to have the default changed.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: