I am preparing for the SCWCD exam using the HF Servlets and JSPs book. I was doing the mock exam of chapter 9 and was confused at Q-6. The question is this!
Assuming the appropriate taglib directives, which are valid examples of custom tag usage: A. <foo:bar /> B. <my:tag></my:tag> C. <mytag value="x" /> D. <c ut value="x" /> E. <jsp:setProperty name="a" property="b" value="c" />
The answer acc. to the book was A, B and D.
When option E was rejected in the book, saying that it is a JSP Standard Action, why not Option-D was rejected?
Option D is anyway a JSTL and not a custom tag and the question clearly states "for custom tag usage".
Hi Manikandan, JSTL is a set of custom tags which have been made by somebody else to make our lives easier.Remember, JSTL are not a part of JSP 2.0 specs.You have to explicitly put the jstl jar file in your WEB-INF/lib directory inorder to use it.
In the question tag <c ut ... /> may be not JSTL "out" tag, as there is no information about that, but any custom tag which just looks the same. Prefix "c" is not reserved so you can use it to bind any custom tag library.