URL encoding the entity ID in Velocity

Wessel, Keith kwessel at illinois.edu
Wed Feb 3 17:00:48 EST 2016


First, sorry about my confusing the get method with the bracketed short-hand. I tried what I had before, but changing the parens to brackets and got a less than ideal response: another literal.

The bean I mentioned before was actually in outside of the map in global.xml. The id I gave it was what I referenced in the value attribute of the entry element inside the map. Obviously not the right way to go.

I tried Brent's suggestion of the value with type java.land.Class, though, and it worked like a charm. Looks very clean, too.

So, I'm good with this.

Thanks, both of you.

Keith


-----Original Message-----
From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor, Scott
Sent: Wednesday, February 03, 2016 3:01 PM
To: Shib Users <users at shibboleth.net>
Subject: Re: URL encoding the entity ID in Velocity

On 2/3/16, 3:56 PM, "users on behalf of Brent Putman" <users-bounces at shibboleth.net on behalf of putmanb at georgetown.edu> wrote:



>Given the Spring wiring requirement here (i.e. not modifying Java code), I think you'd want something like this [2]:
>
>    <util:map id="shibboleth.CustomViewContext">
>        <entry key="urlEncoder">
>            <value type="java.lang.Class">java.net.URLEncoder</value>
>        </entry>
>    </util:map>

I didn't know that syntax, that's better than what I was suggesting obviously.

And I meant that the bean has to be called "shibboleth.CustomViewContext", obviously, not "custom". Thats just the name of the variable we put it in in Velocity.

-- Scott

-- 
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list