Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question9 from HFSJ mock exam

 
santhoshkumar samala
Ranch Hand
Posts: 156
Eclipse IDE Hibernate Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question 9 of HFSJ mock exam :


Which are true about tag libraries in web applications

a)A TLD file must exist in the /WEB-INF/tlds/ directory
b)A TLD file may exist in any subdirectory of WEB-INF
c)A TLD file may exist in the WEB-INF directory in a JAR file
d)A TLD file may exist in the META-INF directory in a JAR file
e)A TLD file in a JAR file must be located at META-INF/taglib.tld


The given answers are b and d

How the answer is b? I think that only d is correct because tlds cant exist in any directory of WEB-INF. according to page number 476 of HFSJ the container will look into 4 places
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
b is correct.

JSP 7.3.4
The container searches for all files with a .tld extension under /WEB-INF or a subdirectory, and inside JAR files that are in /WEB-INF/lib.When examining a
JAR file, only resources under /META-INF or a subdirectory are considered.
The order in which these files are searched for is implementation-specific and
should not be relied on by web applications.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic