Apache Velocity: Is there a standard way of verifying the correctness of a template from the command line?

前端 未结 3 821
忘了有多久
忘了有多久 2021-01-05 13:50

Our website uses the Apache Velocity template language. Our Content Management System already checks any generated XML documents for well-formedness. We\'ve been asked to

3条回答
  •  孤独总比滥情好
    2021-01-05 14:16

    There is a tool distributed with Velocity called TemplateTool, which dumps all the references and it can be used to validate the syntax of the template.

    However, you must have the context setup correctly to verify any template. So the best verification is to write your own tool with your own context.

提交回复
热议问题