If the specified value appears, the content in the TAG body is created. This label is used in the following scenarios:
Check whether a cookie with the specified name appears.
Check whether the header with the specified name appears.
Check whether the JSP bean with the specified name appears or whether the property attribute in the JSP bean with the specified name appears.
Check whether the specified parameter in the request appears.
Check whether the current authenticated user is associated with the specified security role.
Check whether the current authenticated subject has a specified name.
The followingCodeThe logic: Present label is used to check whether the header with the specified name "User-Agent" appears:
<Logic: Present header = "User-Agent">
Your browser is <Bean: Header id = "useragent" name = "User-Agent"/>
<Bean: write name = "useragent"/>. <Br/>
</Logic: Present>
The application of the logic: notpresent tag is exactly the opposite of the logic: Present tag.