• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to know traditional variant of the tag directive?

 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do we need to know this is correct technique to make tag file availabe in a JSP page?
<html xmlns:mytags="urn:jsptagdir:/WEB-INF/tags/" >

I don't see this get mentioned in Head Frist Servlet&Jsp book?

Thanks.

Tiffiny
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never seen that About JSP documents, right ?
I don't think you have to remember it for the exam.
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou.
I got that from chapter 9 in SCWCD Study Guide - by David Bridgewater.

Here's the segment from chapter in that book.
Caution: exam watch
The truth is that you will still probably encounter more traditional JSPs than JSP documents as questions in the exam. So you need to know the traditional variant of the tag directive. This is the <% taglib %> directive�but with a change to one of its attributes. It retains prefix, but tagdir is substituted for uri. So the full declaration equivalent to xmlns:mytags="urn:jsptagdir: /WEB-INF/tags/" in a JSP document is <% taglib prefix="mytags" tagdir=" /WEB-INF/tags" %>. You will often find questions that test whether tagdir and uri can coexist in the same <% taglib %> directive. They can't. prefix is always present, and you can have either tagdir or uri�not both.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may be wrong, but I think it is more important to remember the following : You will often find questions that test whether tagdir and uri can coexist in the same <% taglib %> directive. They can't. prefix is always present, and you can have either tagdir or uri�not both., than to remember the "urn" thing. But now that we've spoken about it, you'll probably remember it
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I see.

Thank you very much for replying me.
Tiffiny
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic