HFJSP says in #9 that "A TLD file may exist in any subdirectory of WEB-INF. But, the spec says that "TLD files should not be placed in /WEB-INF/classes or WEB-INF/lib". So, is this just another case of a bad problem and something I wouldn't encounter on the exam?
I mean, what would happen if I did pop a TLD in the lib directory -- would it still work, meaning the spec just "recommends" we not put TLDs there?
Howdy, Yes, it would *probably* still work (works on at least one version of Tomcat 5), which means it is a suggestion and not an absolute requirement. That's why on the exam, you are required to know that it must be under WEB-INF (unless it is in a JAR), but you are not required to know that the spec recommends against putting in lib or classes.
It's possible that a vendor will interpret this to mean that it is not required to support TLDs placed under lib or classes, but when the spec says "should" or "should not", instead of "must" and "must not" or "cannot", the wording is considered very important... so if you are told that you *should* not do something, that is a recommendation, and not an absolute requirement.
So, for the exam, you are not expected to remember this recommendation, and are expected to know only that the Container will look under WEB-INF.
posted 16 years ago
Thanks for the reply, Kathy.
I just got back from Prometric -- I got an 89% bringing me up to the 1.4 level. I loved your book. Maybe I can give you a list of the certifications I'm after next, and you can write a few more Head First books for me! [ October 26, 2004: Message edited by: Nathaniel Stoddard ]