最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
J2EE学习笔记(3) Struts Logic Tags
时间:2022-07-02 17:32:45 编辑:袖梨 来源:一聚教程网
Logic Tags
语法应用是 --
(cookie specifies the name of the cookie to compare with value)
(header specifies the name of the HTTP header to compare with value)
(parameter specifies the name of the request parameter to compare with value)
(典型)
name指定了bean的名字而property指定了该bean的某个property以便于与value比较, 通常我们还可以加一个scope来限制bean
property is used in conjunction with name to specify a property in the bean specified by name. The property reference can be simple, nested, and/or indexed. For the type of syntax used for property, see the users guide on the Bean Tags.
scope specifies the bean scope which can be page, request, session, application, "any scope" (default)
1) 值比较 Value Comparison: equal, notEqual, greaterEqual, lessEqual, lessThan, greaterThan
比较逻辑是 -- 先试图convert成long double,并比较; 如果parse失败就会用String.equalTo()来比较
1) 值比较 Value Comparison: present, notPresent, empty, notEmpty
present看的是某变量/实例是否存在于某个限定范围,empty看的是该实例是否为null, "", or collection.isEmpty()==true (only for collection)
2) 子字符串匹配 Substring Matching: match, notMatch
match/notMatch 还有一个可选location来指定该substring必须出现在字符串开始还是结尾 (location="start/end")
3) Presentation Location: forward, redirect
用法尚不清楚
4) Collection Utilities: iterate (极常用)
语法应用是 --
name指定了bean的名字而property指定了该bean的某个property以便于与value比较, 通常我们还可以加一个scope来限制bean
property is used in conjunction with name to specify a property in the bean specified by name. The property reference can be simple, nested, and/or indexed. For the type of syntax used for property, see the users guide on the Bean Tags.
scope specifies the bean scope which can be page, request, session, application, "any scope" (default)
1) 值比较 Value Comparison: equal, notEqual, greaterEqual, lessEqual, lessThan, greaterThan
比较逻辑是 -- 先试图convert成long double,并比较; 如果parse失败就会用String.equalTo()来比较
1) 值比较 Value Comparison: present, notPresent, empty, notEmpty
present看的是某变量/实例是否存在于某个限定范围,empty看的是该实例是否为null, "", or collection.isEmpty()==true (only for collection)
2) 子字符串匹配 Substring Matching: match, notMatch
match/notMatch 还有一个可选location来指定该substring必须出现在字符串开始还是结尾 (location="start/end")
3) Presentation Location: forward, redirect
用法尚不清楚
4) Collection Utilities: iterate (极常用)
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21