Source: JSP Spec 2.0 JSP.8.4.3 Pg 213 Packaging Directly in a Web Application
The JSP container must interpret the /WEB-INF/tags/ directory and each
subdirectory under it, as another implicitly defined tag library containing tag
handlers defined by the tag files that appear in that directory. There are no special
relationships between subdirectories - they are allowed simply for organizational
purposes.For example, the following web application contains three tag libraries: /WEB-INF/tags/
Would you consider the above stmt as a typo ??? I think I see 4 tag files here: a.tag, b.tag, c.tag and d.tag
Now it wud be naive to think that the mention of 3 tag libraries in the spec is a typo but can anyone explain what does the spec mean by this ??
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
Joined: Mar 21, 2006
I don't think its a typo.According to my understanding the spec means.
1) The jsp Container will look for a .tag file under WEB-INF/tag or any subdirectory of WEB-INF/tag.
2)We can have any number of subdirectories.These subdirectories are meant only for better organization of web application directories.There is no relation between the directories.Means they are just folders that give a better organization of files.
3)The Container will consider each subdirectory as an implicitly defined tag library containing tag handlers defined by the tag files Or other wise container will consider each subdirectory as seperate tag library.
Hence in the example we have 3 tag libraries and 4 tag file .
1) /WEB-INF/tags/ --> contain 2 tag files a.tag and b.tag
2)/WEB-INF/tags/foo -->contain 1 tag file c.tag
3)/WEB-INF/tags/bar/baz/ --> contain 1 tag file d.tag.