模型属性存储在哪里? [英] Where do model attributes get stored?

查看:140
本文介绍了模型属性存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多但找不到答案。

I searched a lot and can't find an answer.

模型对象值存储在 Spring

其中 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 。如果您正在进行重定向 - 请求属性丢失;这是一个新请求。

第二个问题和第三个问题通过此链接解决传递给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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆