File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tag Files Packaging in a Web Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tag Files Packaging in a Web Application" Watch "Tag Files Packaging in a Web Application" New topic
Author

Tag Files Packaging in a Web Application

Kamal Tripathi
Ranch Hand

Joined: Oct 02, 2008
Posts: 86
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/
/WEB-INF/tags/a.tag
/WEB-INF/tags/b.tag
/WEB-INF/tags/foo/
/WEB-INF/tags/foo/c.tag
/WEB-INF/tags/bar/baz/
/WEB-INF/tags/bar/baz/d.tag

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 ??


Kamal Tripathi
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
Chithra Salam
Greenhorn

Joined: Mar 21, 2006
Posts: 19
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.

Chithra Salam.A
SCJP 85%,SCWCD-in Progress.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tag Files Packaging in a Web Application