JSP custom Label Rtexprvalue attribute Usage Example Analysis _jsp programming

Source: Internet
Author: User

This example describes the JSP custom label Rtexprvalue property. Share to everyone for your reference. Specifically as follows:

In fact, there have been written custom tags, but did not notice the use of <rtexprvalue>, the last few days with a custom label, and suddenly found that the use of <rtexprvalue> is fastidious.

The full name of Rtexprvalue is Run-time Expression Value, which is used to indicate whether a JSP expression can be used.

When <rtexprvalue>true</rtexprvalue> is specified in the <attribute> label, the value of a property representing the custom label can be specified directly or specified by dynamic calculation.

Examples are as follows:

<sql:query var= "Result" >
  select * to MyTable ORDER by NameID
</sql:query>
<% Request.setattribute ("NameID", "2"); %>
<mytag:cupsize cupsize= "1" cupsizes= "${result}" ></myTag:cupSize>
<mytag:cupsize Cupsize= "${nameid}" cupsizes= "${result}" ></myTag:cupSize>

When <rtexprvalue>false</rtexprvalue> is specified in the <attribute> label, the value of a property representing the custom label can only be specified directly, example as follow:

Copy Code code as follows:
<mytag:cupsize cupsize= "1" cupsizes= "${result}" ></myTag:cupSize>

I hope this article will help you with the JSP program design.

Related Article

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.