我有一些使用Struts库的自定义代码,我们正在移植到Spring MVC
我需要替换
SkinTagUtils.findInScope("value1",pageContext) and
SkinTagUtils.putToScope("key", key, "page", pageContext)
进入Spring或JSP ..
答案 0 :(得分:0)
如果您有pageContext
个对象,那么您可以使用它来查找范围内的变量。
pageContext.findAttribute("value1");
或将其设置为页面范围
pageContext.setAttribute("key", key);
注意,JspContext还有其他方便的方法从指定范围检索属性并将属性设置为指定范围。