• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question ID: 43 mandatory sub-elements of tag-lib ?

 
Kevin Thompson
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRanch's mock exam, question 43:
Select the corrrect mandatory sub-elements of the <tag-lib> element.
Possible answers are:
id
taglib-uri
location
taglib-location
uri
The answers given by the mock exam are :
taglib-uri
taglib-location
///////////////////////////////////////////
However, according to Sun's taglib tutorial, taglib-uri and taglib-location are not even sub-elements of <tag-lib>
INFO SOURCE 01 - Sun's Tutorial: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html#75678
Per Sun's tutorial, the 10 sub-elements are:
tlib-version
jsp-version
short-name
uri
display-name
small-icon
large-icon
description
listener
tag
INFO SOURCE 02 - Ken's Study Notes: He says on top of page 46, that the <taglib> sub-elements are:
taglib-uri
taglib-location
INFO SOURCE 03 - Jakarta's tag tutorial: http://jakarta.apache.org/taglibs/tutorial.html#tag_library
Per Jakarta's tutorial the <taglib> sub-elemnts are:
tlibversion
jspversion
shortname
uri
info
They say that there are two ways to locate a tag lib, either by using taglib-uri or using taglib-location.
////////////////////////////////////////
My Synopsis on the mock exam question 43: I think either the question needs to be re-phased or the answer changed.
The provided answer doesn't appear to be correct. Ken's study notes also don't appear to be correct.
Do other people agree with me here?
thanks!
Kevin
[ May 29, 2002: Message edited by: Kevin Thompson ]
 
Jamie McKinney
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rather than look at other people's tutorials or study notes to find out what is valid, why not look at the single source of information that counts?
See the webapp 2.3 dtd: http://java.sun.com/dtd/web-app_2_3.dtd
the part of the dtd to take notice of:
<!--
The taglib element is used to describe a JSP tag library.
Used in: web-app
-->
<!ELEMENT taglib (taglib-uri, taglib-location)>
So, a <taglib> element MUST have a <taglib-uri> element and a <taglib-location> element, in that order.
#added after looking again at previous post#
I see the source of confusion. The sample test question no. 43, and my quote above from the dtd, relates to the webapp deployment descriptor (web.xml). Your infosources and argument is based on the tag library descriptor (*.tld). Two different files with some similar looking tags.
regards,
jamie
[ May 30, 2002: Message edited by: Jamie McKinney ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic