I guess the flash is done by Cookie.
I do the following.
1. @Before annotation in controller, do the secure check and call
flash.put("url", request.url").
2. Do the auth, and say flash.keep("url"), render the login page
3. When submit the login form, I call flash.get("url"). In this step,
the flash can not get the "url".
The url will be used in Controller.redirect(url).
I check the YABE example, I can not find the difference for the
workflow.
Is my understanding wrong? very curious for me.
I use the firebug, the Play response contains the PLAY_FLASH.
While the next request from firefox would not contains the PLAY_FLASH.
The next response also do not include PLAY_FLASH.
Any one know the reason?
2010/4/14 Ma Fai (gmail.com) <maf...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
I check the secure models that using flash to record the url instead
of the hidden field.
The model is include in 1.02 as default. It can turn on by
application.conf.
As below, I found that, in the secure login.html template, there is no
variables like flash.get("url") also no hidden field "url".
How the authenticate or login method get the url?
Actually, in http response request, I can see response header after I
call flash.keep("url").
Set-Cookie: PLAY_FLASH=%00url%3A%2.......
So I will assume the flash also done by cookie tech. Am I wrong?
Secure.java
checkAccess(){
flash.put("url", request.url); #Here use flash to save the
url
#Call login method
...
}
login(){
#Do auth check
#if auth pass, call redirect method
# if not pass
flash.keep("url");
render();#render login page
}
redirect(){
String url = flash.get("url")
redirect(url)
}
On 4月14日, 下午2时00分, Ivan Meredith <i...@ivan.net.nz> wrote:
> Maybe you want to use session instead of flash? I believe session uses
> the cookies, and flash does not. Or you could include the url as a
> hidden field in the form.
>
> 2010/4/14 Ma Fai (gmail.com) <mafa...@gmail.com>:
2010/4/14 Ma Fai (gmail.com) <maf...@gmail.com>: