模型属性存储在哪里? [英] Where do model attributes get stored?
问题描述
我搜索了很多但找不到答案。
I searched a lot and can't find an answer.
模型对象值存储在 Spring $ c $中c>。
其中 model.addAttributes(key,values)
值存储在(例如:session,request)。这个的范围是什么?
Where the model.addAttributes("key","values")
values are stored (eg : session , request).What is the scope of the this?
如何使用JSP获取存储值的值表达式语言
如 $ {key}
?
How I can get the values of the stored value in the JSP using the expression language
like ${key}
?
EL
如何检索模型中的存储值
?
推荐答案
它在请求中,除非使用 @SessionAttributes $ c进行修改$ C>。如果您正在进行重定向 - 请求属性丢失;这是一个新请求。
第二个问题和第三个问题通过此链接解决传递给JSP的Spring模型去哪里了?
It's in the request, unless modified with a @SessionAttributes
. If you're doing a redirect--request attributes are lost; it's a new request.
For your second and third question are addressed by this link Where does the Spring Model that is passed to a JSP goes to?
这篇关于模型属性存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!