Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-651

Velocity 1.6 does not work with Struts MessageTool 1.4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.6.1, 1.7
    • Engine
    • None
    • Velocity 1.6, Struts MessageTool 1.4, Struts 1.2.9, Java 1.6_10

    Description

      The org.apache.velocity.tools.struts.MessageTool of VelocityTools version 1.4 contains a method signature of String get(String key, Object args[]).

      With Velocity 1.5, one could use a Struts resource, such as
      test1=this is a

      {0}

      in a Velocity template with
      $text.get('test1', ['TEST'])

      that would render the text
      this is a TEST

      Unfortunately, since the released version 1.6 I get the following exception:
      Invocation of method 'get' in class org.apache.velocity.tools.struts.MessageTool threw exception java.lang.IllegalArgumentException: wrong number of arguments at ..

      The setting of the property runtime.references.strict has no influence.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sschmid Stephan Schmid
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: