[tools] Using VelocityViewServlet with custom Properties

Christopher Schultz <[email protected]> Fri, 10 Jun 2022 22:20:26 -0400
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <[email protected]>
All,

I happen to be using tools-2.0 but it doesn't look like the code has 
changed much up through today.

I have a subclass of VelocvityViewServlet I've been using for years that 
further customizes things for my environment. I'd now like to be able to 
provide a custom set of Ptoperties during startup instead of loading 
those properties from an external file. Is that possible?

I'm talking about basic velocity engine config, like resource loaders, 
directive configuration, etc.

Tracing through the code, it looks like getVelocityView basically 
delegates everything to ServletUtils which isn't overridable due to the 
way it's been written. I could override getVelocityView but then I'd 
probably end up replicating a great deal of VelocityView or ServletUtils.

Is there anything obvious that I'm missing?

Thanks,
-chris