On 16/05/13 18:54, Les Hazlewood wrote:
> Hi John,
>
> I don't have any ideas as to why this wouldn't work in a Grails
> environment (I also haven't looked at the Grails Shiro plugin in quite
> a while).
>
> Is there a sample app or something that I can look at to see what is going
 on?
>

I'll put one together for you. What should I do with it, having done so?

There's something else I've come across which doesn't work as it should 
with Grails and Shiro. Grails has the concept of something called flash 
scope, with is a kind of short-term session storage, lasting until the 
next request, designed to survive redirects. So you can write a message 
to flash, do a redirect and retrieve the message from flash, with the 
attribute being automatically cleared after this follow-up request. This 
doesn't work with Shiro native sessions, though. In my application, 
anything written to flash scope immediately disappears. I.e., something 
like this
would print 'null':

flash.message="Whatever"
println flash.message

In a little demo app I just put together, the message gets written to 
flash OK, but disappears before the subsequent request comes in. It's no 
big deal and I can work round it, but I was just wondering if you might 
have any ideas as to what the cause was and if it's easily fixable.

John

Reply via email to