Hi,
Following Question from Enthuware mock exam.
You are using a tag library with prefix "generator", which supports a tag named "random". This tag generates a
random number and sets it to a variable named "value". Which of the following will output this value in the page?
a.<generator:random><%=value%></generator:random>
b.None of the above.
I selected b. but the answer says a. I think this is wrong if a has to be correct; then in the tag handler the variable should be set as a attribute like pageContext.setAttribute("value",value);.Is that correct?
I did pageContext.setAttribute("value",value); in my tag handler and used
<generator:random>${value}</generator:random> this works fine.but again
<generator:random><%=value%></generator:random> this gives an error saying sriptlet invalid i have proper entries in the TLD
JSP and scriptlets are not disabled but still i get this error.
Thanks