JSP taglib; Implicit Map Entries from TLDs

JSP 2.0
「のはずだ」ではまる。すぐにJSPの仕様を確認すればよかったのだが、気持ちが上向かないときこそスグに。自戒のメモ。

JSP.7.3.4 Implicit Map Entries from TLDs

  • 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.
  • Each TLD file is examined. If it has a <uri> element, then a new <taglib> element is created, with a <taglib-uri> subelement whose value is that of the <uri> element, and with a lt;taglib-location> subelement that refers to the TLD file.
  • If the created <taglib> element has a different <taglib-uri> to any in the taglib map, it is added.

JARのMETA-INFを見るのは、WEB-INF/lib下のJARなんだよな。他にもいろいろ書いてあるので、迷ったら仕様のこの辺を確認するということで。
ついでに、web.xmlの<taglib>はJSP 2.0では、例によって<jsp-config>下に行ってます。