Hi John, The easiest thing would probably be to put it up on GitHub somewhere so anyone can clone it/play with it.
As for ideas, I don't have any at the moment. The way I understand flash scope, is that it is put in the session on the first request and then removed from the session on the 2nd at the time it is retrieved. That should work just fine - I see no issues there. -- Les Hazlewood | @lhazlewood CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282 On Mon, May 20, 2013 at 4:04 AM, John Moore <[email protected]> wrote: > 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 > >
