profileRequestContext.getSubcontext in error.vm

David Huebner david.huebner at daasi.de
Wed Sep 12 11:27:41 EDT 2018


Disclaimer: I've probably never fully understood how velocity and 
passing over variables to velocity works.,.
Anyways, I'm experiencing the following, which I do not understand.

The following works:

I define a new flow, which passes over a custom subcontext to velocity:

<view-state id="DisplayErrorPage" view="myflowError">
   <on-render>
     ...
     <evaluate 
expression="opensamlProfileRequestContext.getSubcontext(T(my.context))" 
result="viewScope.myContext" />
   </on-render>
</view-state>

And print something in the template:

...
$myContext.getName()
...

The following does not work:

I want to print the same value in error.vm. According to the wiki 
profileRequestContext should be available there:

...
$profileRequestContext.getSubcontext('my.context').getName()
...

It simply prints the entire thing, as if the variable does not exist in 
velocity.

What's the difference? How can I get this to work in error.vm?

Thanks,

David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2269 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://shibboleth.net/pipermail/users/attachments/20180912/41dc72b9/attachment.p7s>


More information about the users mailing list