PrepAway - Latest Free Exam Questions & Answers

what syntax would the developer use in order to use the tag called add that adds the two numbers together?

A developer wants to make use of a pre-existing tag library in a JSP. One of the tags in the library
takes in two numbers, adds them together and outputs the result. The following directive appears
at the top of the JSP that will use the tag:
<%@ taglib uri=”http://www.mycorp/addition” prefix=”calculate” />
Given the following except from the tag library descriptor, what syntax would the developer use in
order to use the tag called add that adds the two numbers together?
<tag>
<name>add</name>
<tagclass>com.examples.Calculator</tagclass>
<attribute>
<name>first</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>second</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>

PrepAway - Latest Free Exam Questions & Answers

A.
<calculate:add first=”5″ second=”10″ />

B.
<addition:add first=”5″ second=”10″ />

C.
<calculate:add>first=”5″,second=”10″</calculate:add>

D.
<calculator:add first=”5″ second=”10″ />


Leave a Reply