Skip to content

Velocity driver injects properties with periods with no way to get at them. #22

Description

@mrdanpsmith

When trying to use velocity, it appears to be impossible to evaluate an included property with a "." in it. Which is a problem, because that's how most Java properties files are laid out.

There are a few ways to solve this. I think the best idea would be to separate the properties files and other variables into separate variables within the context. Then within a Velocity template you could do something like: $prop.get("some.property.with.periods") and that would give you the value in the template.

Another option is to use something like ContextTools to allow $context to be used within the templates. That would give the template the ability to pull it out using standard velocity tooling.

Currently, I had to just rename the value in my properties file to get it to show up in my template. It's a workaround, but it isn't ideal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions