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

Add the VelocityWriter to the context of the VelocityViewServlet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.2
    • None
    • None
    • Operating System: All
      Platform: All
    • 9139

    Description

      The reason and purpose of this is for performance situations as stated by
      Nikolaj.Brinch.Joergensen@sdk.sas.com

      Following the recent thread discussion...

      http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg07051.html
      http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg07066.html

      <snip>
      BUT...this shows where an enhancement would be nice to have. If the
      statement in the mergeTemplate() method of:

      template.merge( context, vw);

      was replaced with:

      performMerge( template, context, vm );

      where performMerge was a protected method of VelocityServlet with the
      original statement as its default behavior, then you could easily
      override this method in a subclass of VelocityServlet to place the
      writer into the context. The VelocityServlet could still manage the
      private writerPool.
      <\snip>

      An alternative solution would be to allow the writerPool, encoding and other
      private methods be protected so that it would be easier to override the
      mergerTemplate method so this could be implemented by the developer. Maybe both
      should be done.

      bill

      Attachments

        Activity

          People

            nbubna Nathan Bubna
            bolandb@attbi.com Bill Boland
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: