Struts中<s:debug/>标签中ValueStack与ContextStack的区别
来源:互联网 发布:淘宝没有购物车营销 编辑:程序博客网 时间:2024/06/18 02:41
在Struts2中,我们用<s:debug/>
标签就能看到有关调试个详细信息,如图所示:
在用户发送HTTP请求给Struts2框架后,Struts2框架会创建ActionContext、ValueStack和相应的action对象:
而该action对象会放入ValueStack对象中,ValueStack对象则会放入ActionContext对象中。在JSP页面访问context的数据时,都需要用“#”,如:
<s:property value="#attr"/>
但ValueStack是其根对象则不需要,因此,在访问Action对象的属性时,不需要使用“#”。
<s:property value="username"/>
简而言之:
ValueStack很简单,里面放的都是Action的属性你可以直接用property标签加参数名访问Action参数。而Stack Context里面比较乱,常用的有map型的request/session/attr/application,用OGNL访问前面要加上 “#”例如 #session.
1 0
- Struts中<s:debug/>标签中ValueStack与ContextStack的区别
- Struts中valueStack的结构
- Struts Ongl valueStack与ActionContent.ValueStack的区别
- Struts中自定义标签中获取值栈valuestack
- Struts中自定义标签中获取值栈valuestack
- struts标签中<s:iterator>的使用
- struts标签中<s:action>的用法
- Struts标签-OGNL-EL-ValueStack-ActionContext之间的区别
- Struts中S标签与C标签用法
- struts中<s:form></form>标签的理解
- Struts 2中<s:action>标签的用法
- Struts 2中<s:bean>标签的用法
- Struts 2中<s:include>标签的用法
- Struts 2中<s:iterator>标签的用法
- Struts 2中<s:append>标签的用法
- Struts 2中<s:sort>标签的用法
- Struts 2中<s:subset>标签的用法
- Struts 2中<s:generator>标签的用法
- 搭建svn服务器
- UIImage图片处理,旋转、截取、平铺、缩放等操作
- Ubuntu16.04配置小结
- Android MVP
- nodejs 模块的流程
- Struts中<s:debug/>标签中ValueStack与ContextStack的区别
- 新建JSP页面时报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- memcache与memcached的区别
- 数组中
- 微信小程序一(开始构建)
- js对子节点操作
- UITableView中Group的顶部出现空白
- MySQL Docker 单一机器上如何配置自动备份
- 3075 走捷径