Struts2 OGNL表达式详解
来源:互联网 发布:sap系统优缺点知乎 编辑:程序博客网 时间:2024/05/19 23:10
Struts2使用标准的Context进行OGNL表达式求值,
OGNL处理的顶级对象是OGNL ValueStack,可以通过如下方式即可:
#取得ValueStack中的bar属性
${bar}
OGNL处理的顶级对象是OGNL ValueStack,可以通过如下方式即可:
#取得ValueStack中的bar属性
${bar}
OGNL上下文中有且仅有一个根对象(ValueStack)。Struts2为我们定义了许多命名对象,他们分别是:
"ValueStack","Parameters","Session","Request", "Appliction","Attr"
其中"ValueStack"被设置为上下文的根对象。访问非根对象必须加上"#"号,输出格式如下:
<s:property value="#request.student.age"/>
一般使用<s:debug>标签查看ValueStack和Stack Context的值
<%=request.getSession().getAttribute("user") %><br/> ValueStack point:<s:property value="point" /><br/> ValueStack student.name:<s:property value="student.name"/><br/> Stack Context.request:<s:property value="#request.point"/><br/>Stack Context.session:<s:property value="#session.user"/><br/><s:property value="locale"/><br/><s:property value="[0]"/><br/><s:textfield value="%{#request.point}"/> <s:debug></s:debug>
原文链接:http://www.cnblogs.com/beliefbetrayal/archive/2012/02/11/2347244.html
- Struts2 OGNL表达式详解
- struts2 ognl表达式详解
- Struts2:OGNL表达式详解
- OGNL表达式struts2标签“%,#,$”详解
- Struts2的OGNL表达式详解
- Struts2中的OGNL表达式的详解
- struts2基础探索之OGNL表达式详解
- struts2的OGNL表达式
- struts2的OGNL表达式
- OGNL表达式struts2标签“%,#,$”
- struts2 OGNL表达式
- OGNL表达式struts2标签“%,#,$”
- Struts2中的OGNL表达式
- 再论 Struts2 OGNL表达式
- OGNL表达式struts2标签“%,#,$”
- OGNL表达式struts2标签“%,#,$”
- struts2 ognl 表达式
- OGNL表达式struts2标签“%,#,$”
- 雷锋微视点:腾讯电商、搜搜、微信将出门独立
- SAP LUW 逻辑工作单元
- eclipse 注释
- Android permission 权限类及中文说明
- 三、装饰模式
- Struts2 OGNL表达式详解
- 批处理文件打包.bat
- java 定时器
- DIV+CSS 文字向上滚动
- DSP/BIOS 介绍
- xp3 系统下安装sql2005 失败(msxml6失败)
- hdu 3642 Get The Treasury(线段树求体积并)
- 远程连接MYSQL提示Host is not allowed to connect to this MySQL server
- 百度地图API的使用