Ognl
来源:互联网 发布:永生 知乎 编辑:程序博客网 时间:2024/06/05 03:40
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
访问OGNL上下文和Action上下文,#相当于ActionContext.getContext();下表有几个ActionContext中有用的属性:
名称 作用 例子
parameters 包含当前HTTP请求参数Map #parameters.id[0]作用相当于request.getParameter("id")
request 包含当前HttpServletRequest的属性(attribute)Map #request.userName相当于request.getAttribute("userName")
session 包含当前HttpSession的属性(attribute)的Map #session.userName相当于session.getAttribute("userName")
application 包含当前应用的ServletContext的属性(attribute)的Map #application.userName相当于application.getAttribute("userName")
attr 用于按request > session > application顺序访问其属性(attribute) #attr.userName相当于按顺序在以上三个范围(scope)内读取userName属性,直到找到为止
2. 用于过滤和投影(projecting)集合,如books.{?#this.price<100};
3. 构造Map,如#{‘foo1′:’bar1′, ‘foo2′:’bar2′}
- ognl
- ognl
- OGNL
- OGNL
- OGNL
- OGNL
- OGNL
- ognl
- OGNL
- ognl
- ognl
- ognl
- ognl
- ognl
- ognl
- ognl
- ognl
- ognl
- Qt 正则表达式 例子
- Curses library not found. Please install appropriate package
- Swing所支持的事件监听器
- html Dom
- 562米高岛屿上发现黑色龙虾 曾被认定已灭绝
- Ognl
- 【vc】DECLARE_SERIAL / IMPLEMENT_SERIAL 宏的技术详解
- struts2中的 ThreadLocal模式
- java/final变量,final函数,抽象类,接口,内部类,object类
- 排序总结
- 使用VC6开发WIN7多点触控程序
- 如何打印内核调用堆栈及函数名
- 为什么不能从静态的方法里面调用非静态方法,或变量?
- Spring MVC的实现原理