• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Differentiate Custom Tags and JSTL - HF Chapter 9 Mock Exam

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perfect explanation. JSTL Core tags library as well as XML, SQL, Formatting, Internalization (....) are all custom tags. They are just already developped for you.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic