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

Macros not evaluated on the first attempt with #parse

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5
    • 1.6
    • Engine
    • None
    • Operating System: All
      Platform: PC
    • 17669

    Description

      I have noticed that sometimes macros do not get evaluated after Velocity has
      just been started. A subsequent request for the same resource produces a valid
      document, where macros are now correctly evaluated.

      Here's an example: I have a WAP-Mail webapp, which runs on Tomcat 3.3a. It uses
      Velocity to render the content, and the Velocity versions I have used are 1.2-
      dep, 1.3-dep and 1.3.1-dep. This problem occurs with all of these versions.

      The first request should produce a message list (there's an autologin feature,
      so the message list page is the first one being accessed). Here's the most
      relevant part of the content:

      ------------------------------------------------------------------------------

      <p>Folder: INBOX<br/></p>

      <p>
      <br/><b>Date: 05.03 11:16</b>
      <br/>Sender: John Doe
      <br/>Subject: <a href="/wapmail/message/show/

      Attachments

        Activity

          People

            Unassigned Unassigned
            sami@netorek.fi Sami Leino
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: