wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Differentiate Custom Tags and JSTL - HF Chapter 9 Mock Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Differentiate Custom Tags and JSTL - HF Chapter 9 Mock Exam" Watch "Differentiate Custom Tags and JSTL - HF Chapter 9 Mock Exam" New topic
Author

Differentiate Custom Tags and JSTL - HF Chapter 9 Mock Exam

Manikandan Jayaraman
Ranch Hand

Joined: Sep 15, 2004
Posts: 230
Hi All,

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".

Can someone help me out?

Regards,
Mani


Regards,<br />Mani<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (94%)
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
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.

So, option D is Correct.

Regards,
Saurabh
Frederic Esnault
Ranch Hand

Joined: Feb 13, 2006
Posts: 284
Perfect explanation. JSTL Core tags library as well as XML, SQL, Formatting, Internalization (....) are all custom tags. They are just already developped for you.


SCJP 5 - SCWCD 1.4 - SCBCD 1.3 - Certification study documents/resources: http://esnault.frederic.free.fr/certification
Denis Zjukow
Ranch Hand

Joined: Mar 15, 2006
Posts: 39
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Differentiate Custom Tags and JSTL - HF Chapter 9 Mock Exam