Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

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

@mrdanpsmith

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions