How add new Velocity Templates?

Cantor, Scott cantor.2 at osu.edu
Fri Feb 17 09:58:17 EST 2017


> I would to add pages that are able to use the wonderful
> MessageTraslation property of Shibboleth IdP v3.x and, hence, are able
> to use #springMessageText("value-provided-by-messages","default-value")
> to perform a perfect internationalization of useful pages easily.
> 
> This could help me to add easily pages for several languages for the IdP.

Ah, yeah, I can see that, that didn't occur to me being my ugly American self.

Well, that's "just" a Spring feature. You could try JSP pages, which you can put really anywhere inside the webapp tree, and I think they would inherit the surrounding Spring context and be able to tap into the message features.

Velocity's impossible by itself, you can't just use templates. They're Spring views. You would have to deploy some kind of MVC servlet controller to render them or actually add custom webflows to the IdP in idp.home/flows/ that just render a view-state.

But now that I mention it, there is an example of exactly that kind of dummy flow in the IdP now, it's in flows/user/prefs and it just renders a Velocity template. So if you prefer Velocity, that's a simple example to copy. That's a bit heavyweight just to display some static content but if there are other simpler ways to get a view template rendered, I don't know them.

-- Scott



More information about the users mailing list