logic:notPresent

<logic:notPresent>

Generate the nested body content of this tag if the specified value is not present in this request.

Depending on which attribute is specified, this tag checks the current request, and evaluates the nested body content of this tag only if the specified value is not present. Only one of the attributes may be used in one occurrence of this tag, unless you use the property attribute, in which case the name attribute is also required.

Can contain: JSP

Attributes
NameDescriptionType
cookie

Checks for the existence of a cookie with the specified name.

String
header

Checks for the existence of an HTTP header with the specified name. The name match is performed in a case insensitive manner.

String
name

Checks for the existence of a JSP bean, in any scope, with the specified name. If property is also specified, checks for a non-null property value for the specified property.

String
parameter

Checks for the existence of at least one occurrence of the specified request parameter on this request, even if the parameter value is a zero-length string.

String
property

Checks for the existence of a non-null property value, returned by a property getter method on the JSP bean (in any scope) that is specified by the name attribute. Property references can be simple, nested, and/or indexed.

String
role

Checks whether the currently authenticated user (if any) has been associated with the specified security role.

String
scope

The bean scope within which to search for the bean named by the name property, or "any scope" if not specified.

String
user

Checks whether the currently authenticated user principal has the specified name.

 

 

1.3官方例子

 

当name中的类实例不存在任何范围中时候,会显示标签里的内容。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值