• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFS page 487, question 6

 
Jessica White
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
6. Assuming the appropriate taglib directives, which are valid examples of custom tag usage?

D. <c ut value="x" />
is listed as a correct answer.
However, is not this a JSTL <c ut>? Can it be considered a custom tag as well?

Anbody pls clear it up? Thx.
 
Paul Croarkin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "c:" prefix is by convention used for the core tags in JSTL, but "c:" is not a reserved prefix. Therefore, you could technically use it for a custom tag, but it would not be a good idea.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Jessica,
This is *really* confusing terminology and we should have explained it better. JSTL *is* still an example of a custom tag... it is a set of custom tags that someone's already made for you. They are kind of standardized custom tags

On page 435, we do a wimpy job of stating that:

"Fortunately, there's a standard library of custom tags known as the JSP Standard Tag Library."

And... Paul is absolutely right as well--you *could* have your OWN custom tag named "out", that you use with a prefix of "c", so the fact that you see a tag <c ut> does not tell you the whole story. All it tells you is that this is an example of correct custom tag syntax, but unless you see the declarations in the JSP, you don't know what the prefix "c" is mapped to for a URI--it *might* be JSTL, or it might be some *other* custom tag library...

Isn't it fun?

cheers,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic