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.