Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF - Pg 606, Q 2, Answer C

 
Henrik Krievs
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is answer C correct ?

I thought the container only looked for TLD's under WEB-INF ?

Rgds, Henrik
 
Roger Yates
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is. If you decide to put your tag files into a jar, the jar needs to contain a TLD for them. This resides in the META-INF directory in the jar file (JAR doesn't have a WEB-INF).
Can't recall where it's first mentioned, but it is mentioned on p548.

--> p476
[ October 15, 2004: Message edited by: Roger Yates ]
 
Henrik Krievs
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But it says the TLD will be inside the LIB directory..inside the jar file !

If you put the TLD in WEB-INF/lib - will the container also be aable to find it there ??

Rgds, Henrik
 
Roger Yates
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it would - any directory under WEB-INF. But even if it didn't look for TLDs in WEB-INF/lib, the container still knows to look in the lib directory for jar files. It also knows that jar files may contain a META-INF directory containing TLDs, so for each jar it finds, it will look inside for TLDs in the META-INF directory (or subdir).

So in this case the TLD is inside the jar.
The jar is in WEB-INF/lib.
So, by deduction, the TLD is in WEB-INF/lib since that's where the jar it lives in sits.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic