这是我们老师用英语写的问题,那位师兄帮忙看一下这个问题怎么做。

来源:百度知道 编辑:UC知道 时间:2024/07/07 01:14:57
问题就是:Please design a new Scope named FlashScope, which likes request scope, session scope etc. Whereas the request scope is defined as existing for the lifetime of a request, the flash scope is defined as existing for the duration of this request and the subsequent request. Any item added to the flash scope will be made available as a request attribute during the current request, and during the next request.
这是题的背景: Redirect-after-Post is the name given to a fairly simple technique. The idea is that after a form POST has occurred and the server has done something significant (create a user, place a trade etc.) that it is safest to then redirect the user to another (or perhaps the same) page. By redirecting we ensure that if the user hits the refresh button they don't re-submit the form. If we were to have simply forwarded to a page after the POST, a refresh would re-post the form!
But there is a down side to redirecting. Anything stored in request attributes is lost when

请设计叫做 FlashScope 的一个新的镜, 这喜欢请求镜,会议镜等等,然而当为请求的生存基存在的时候,请求镜被定义,闪光镜当做为这一个请求的延时和后来的请求存在被定义。 任何的项目增加 , 闪光镜将会在目前的请求期间被做有效如一个请求属性, 和在下一个请求期间。