Logic: Present

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.