aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Confirmation About tag files inside jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Confirmation About tag files inside jar" Watch "Confirmation About tag files inside jar" New topic
Author

Confirmation About tag files inside jar

Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
if we have to store tld files inside jar we have to store inside META-INF folder.
What if we store tag file inside jar?
should we store tag files inside META-INF folder inside jar.

Thanks
Sreeraj G Harilal
Ranch Hand

Joined: Apr 19, 2006
Posts: 310
If we want to deploy tag files as jar then the tag file must be placed in under WEB-INF/tags directory or its Subdirectory

example:
/WEB-INF/tags/example.tag
/WEB-INF/tags/MyDirectory/example.tag

Then you have to create a tld file for that tag file.
The tld file must be placed under META-INF directory.
The tld file must use <tag-file> tag instead of <tag> tag.

example:

<taglib>

<uri>www.manning.com/scwcd/example</uri>
<tag-file>
<name>example</name>
<path>/META-INF/tags/example.tag</path>
</tag-file>
</taglib>

then make a jar file for that META-INF directory then place it in WEB-INF/lib directory


SCJP 5.0<br />SCWCD 1.4<br />Preparing for <b>SCEA</b>.<br /><b>"I prefer an interesting vice to a virtue that bores."</b>
Arvind Giri
Ranch Hand

Joined: Jun 26, 2005
Posts: 91
A tag file can be placed anywhere in the jar. But it must have a tld, which should be there in META-INF or its sub-folder.


Regards<br /> <br />Arvind Giri<br />MCA,SCJP 1.4,SCWCD 1.4<br />Looking for SCDJWS
Sreeraj G Harilal
Ranch Hand

Joined: Apr 19, 2006
Posts: 310
SORRY IT WAS A MISTAKE. The above answer was wrong!
means use META-INF instead of WEB-INF
Here is the correct.

If we want to deploy tag files as jar then the tag file must be placed in under META-INF/tags directory or its Subdirectory

example:
/META-INF/tags/example.tag
/META-INF/tags/MyDirectory/example.tag

Then you have to create a tld file for that tag file.
The tld file must be placed under META-INF directory.
The tld file must use <tag-file> tag instead of <tag> tag.

example:

<taglib>

<uri>www.manning.com/scwcd/example</uri>
<tag-file>
<name>example</name>
<path>/META-INF/tags/example.tag</path>
</tag-file>
</taglib>

then make a jar file for that META-INF directory then place it in WEB-INF/lib directory
Sreeraj G Harilal
Ranch Hand

Joined: Apr 19, 2006
Posts: 310
No Aravind Giri, i think you are wrong tag files must be place under META-INF/tags directory or its subdirctory for jar deployment.
Dilshan Edirisuriya
Ranch Hand

Joined: Apr 22, 2006
Posts: 299
I also think that tag files must go to tags or it's subdirectory.


Dilshan Edirisuriya SCJP1.4, SCWCD1.4, SCBCD 5
Arvind Giri
Ranch Hand

Joined: Jun 26, 2005
Posts: 91
Yes Guys! You are right!

I got confused with <path> element which requires full path.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confirmation About tag files inside jar