Hi ,
I came across this question in one of the enthuware mock exams
Assuming that a taglib directive of <%@ taglib prefix='abc' uri='http://abc.com/taglibX'> exists, what will be the output of the following code?
Given the body content is defined as tagdependent in the tld.
<abc:print>
<%= 3*4 %>
</abc:print>
(Assume that this tag just prints its body to the output.)
The answer given is <%= 3*4 %> with an explanation Since the body content of the tag is tagdependent, the body of the tag will not be processed by the
JSP engine. It must be processed by the tag itself. In this case, it will get <%= 3*4%> as its body. So this is what it will output in the result.
My queries are :
(1) If we have an EL instead in the body say ${beanName.property} then will it be also printed as it is without evaluation ???
(2) My second query is how is the assumption mentioned relevant to the question (Assume that this tag just prints its body to the output.)
Can somebody help me over this ...
Thanks in advance.