Velocity code not rendering in error.vm

Cantor, Scott cantor.2 at osu.edu
Tue Apr 11 12:46:06 EDT 2017


> Is there an easy way, when $environment isn't available, to get an external
> variable? Would I need to use the custom variable to pass in the needed
> class? I'm guessing, if environment isn't available, neither would be custom,
> and I'm a bit stumped how else I'd pull in that variable. Any hints appreciated.

I looked at the code, and I created a class that attempts to populate a few things of use through the MVC layer:

* request
* encoder
* springContext

The springContex variable in particular could probably get at global Spring beans by name.

More exotically, the class I built there (net.shibboleth.ext.spring.error.ExtendedMappingExceptionResolver) theoretically can take a function at build time that can dynamically add additional attributes to the view, but that isn't wired up at the moment. I suspect you can probably get enough done with the existing behavior.

And no, I didn't remember doing any of that when you first asked.

-- Scott



More information about the users mailing list