<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 2/3/16 3:51 PM, Cantor, Scott wrote:<br>
</div>
<blockquote cite="mid:29E8147A-15EC-48AE-907D-6634EB4396AE@osu.edu"
type="cite">
<pre wrap="">On 2/3/16, 3:29 PM, "users on behalf of Wessel, Keith" <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@shibboleth.netonbehalfofkwessel@illinois.edu"><users-bounces@shibboleth.net on behalf of kwessel@illinois.edu></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I've tried, and I'm closer, but I think I still need a hint for bean creation. I've got a bean with an id element of custom.urlEncoder and a class of java.net.URLEncoder.
</pre>
</blockquote>
<pre wrap="">
It only has static methods, I'm not sure what you get from calling a static method on a class instance like that. If that works, then your problem might just be the Velocity part and how you named it.</pre>
</blockquote>
<br>
See my other note, but: actually that might work. I can't see that
java.net.URLEncoder has anything to *prevent* instantiation. So if
you can create an instance, I think you can still call static
methods on it. Injecting the java.land.Class instance still feels
more right, though, for using static methods.<br>
<br>
<br>
<blockquote cite="mid:29E8147A-15EC-48AE-907D-6634EB4396AE@osu.edu"
type="cite">
<blockquote type="cite">
<pre wrap="">I'm assuming it needs some properties associated with it. Because, if I try to use it in my login template as:
$custom(urlEncoder).encode("$entityID","utf-8")
</pre>
</blockquote>
<pre wrap="">
Brent mentioned you can use brackets if the bean called "custom" is defined to be a map, but I don't think you can use parentheses to access a named element in a map.
</pre>
</blockquote>
<br>
I missed that in other note. No, you can' do that AFAIK. You
either call the get("..") method, or you use the square bracket
index notation. Not parens alone.<br>
<br>
</body>
</html>