logic:empty标签判断脚本变量是否为null,是否是一个空的字符串(长度为0),是否是一个空的collection或map(调用isEmpty()方法来判断)。logic:notEmpty标签类似。
<logic:empty name="myBean">
The bean is missing
</logic:empty>
<logic:notEmpty name="myBean">
The bean is not missing
</logic:notEmpty>
上段代码表示当一个名为myBean的bean在所有的scope中都不存在时,输出The bean is missing;存在的话输出The bean is not missing。
此标签有三个属性:name、property和scope。
logic:present和logic:notPresent
检查header、request parameter、cookie、JavaBean或JavaBean propertie是否存在且不等于null。另外还可以检查当前用户的身份,使用属性user和role。
其它的属性有:name、property、scope、cookie、header、parameter。
<logic:notPresent name="myBean" property="prop" scope="page">
The bean property bean.prop is present
</logic:notPresent>
上段代码检查在page作用域内名为myBean的bean是否有一个prop属性。
empty:判断指定的变量或对象是否为空或者为空字符串“”------这个可能是值判断
present:判断指定的对象是否存在-------这个可能是地址判断
分享到:
相关推荐
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>标签 16.4.6、<html:hidden...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>标签 16.4.6、<html:hidden...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
<logic:equal value="modify" property="action" name="projectForm"> <bean:message key="project.project_modify"/> </logic:equal> 上面的示例表示,如果projectForm的action属性等于modify,则处理<bean:message...
struts标签库 文章目录 bean:cookie 2 bean:define 3 bean:header 4 bean:include 5 ...logic:present 23 logic:messagesPresent 23 logic:empty 24 logic:match 24 logic:equal 25 logic:forward 26 总结 26
<item>"bt-pan"</item> </string-array> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, ...
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> <Video codec="h264" bitRate="9000000" width="1920" height="1080" frameRate="24" /> <Audio codec="aac" bitRate="128000" sample...
<item>"bt-pan"</item> </string-array> 3、 Q:\a33\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, ...
<item>"bt-pan"</item> </string-array> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, ...
<item>"bt-pan"</item> </string-array> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, ...
Windows: Improved font selection logic Windows: Fix ctrl+` shortcut for UK (ISO) keyboards Windows: Improved fallback font handling in UI elements Windows: The subl executable on OS X and plugin_host....
Default:<empty> 'FILE-decryptionKey Incase the FILE-decryption key was changed you may enter it here. (Together with 'Start Offset to Script Data' that is advanced stuff you may probaly don't ...
Part of protocol has always been the acknowledgment of the hierarchical standing of all present. Protocol rules are based on the principles of civility. Standards are important for protocols so that...