Address: http://www.bianceng.cn/Programming/Java/201103/25125.htm
1. Logic: empty
This label is used to determine whether it is null. If it is null, the content embedded in the label body will be processed. This label is used in the following scenarios:
1) when the Java object is null;
2) When the string object is;
3) When isempty () in the Java. util. Collection object returns true;
4) When isempty () in the Java. util. map object returns true.
Eg.
<Logic: Empty name = "userlist">
...
</Logic: Empty>
This sentence is equivalent:
If (userlist. isempty ()){
...
}
2. Logic: notempty
The application of this tag is exactly the opposite of the logic: Empty tag.
3. Logic: equal
The label is equal to the comparison operator.
Eg1. compare whether the user's status attribute is 1. If it is 1, the output is "enabled ";
<Logic: equal name = "user" property = "state" value = "1">
Enable
</Logic: equal>
Eg2. if the value in the previous example is dynamically obtained, for example, the bean: Write output is required. Because struts does not support label nesting, El can be used to solve this problem.
<Logic: equal name = "charge" property = "num" value = "$ {business. Num}">
......
</Logic: equal>
4. Logic: notequal
This label indicates the opposite of logic: equal. It is used in a similar way, slightly.
5. Logic: Forward
This label is used to implement page orientation and find the global forward of the configuration file.
Eg. <logic: Forward name = "Index"/>
6. Logic: greaterequal
Is a comparison character greater than or equal.
Eg. When a student's score is greater than or equal to 90, the output is "excellent ":
<Logic: greaterequal name = "student" property = "score" value = "90">
Excellent
</Logic: greaterequal>