Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Location of TLD files : Is HFS Correct?

 
Justin
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following segment is from JSP 2.0 Spec

JSP.7.3.1 Identifying Tag Library Descriptors
Tag library descriptor files have names that use the extension .tld, and the
extension indicates a tag library descriptor file. When deployed inside a JAR file,
the tag library descriptor files must be in the META-INF directory, or a subdirectory
of it. When deployed directly into a web application, the tag library descriptor
files must always be in the WEB-INF directory, or some subdirectory of it. TLD
files should not be placed in /WEB-INF/classes or /WEB-INF/lib.



In HFS, it is mentioned in number of places (and also there is a question in Mock exam), that TLD files can be placed in any subdirectory of WEB-INF.

So is HFS correct?

[ October 23, 2004: Message edited by: Justin ]
[ October 23, 2004: Message edited by: Justin ]
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess HFS&J just miss about the location cannot be within lib and classes.

Nick
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy --
In this case, the way we say it in the book is correct for the exam. In the spec (and in the book) we make a BIG distinction between the word "must" and "should", so when the spec writers say "should" and "should not" that is very different from "must" or "must not" or "cannot".

So the correct answer is still that the TLD must be within WEB-INF or a subdirectory. The fact that you *should* keep it out of /classes or /lib is a separate issue, and we felt that it was hard enough to memorize all the details, so we stuck with the ones that were absolute "musts" in the spec

So, you're safe with the way we talk about it in the book, *and*, when you're studying the spec, pay VERY close attention to "should" vs. "must"--the real exam does, and (most of the time) the spec writers used those words very carefully.

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