• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Confirmation About tag files inside jar

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 310
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No Aravind Giri, i think you are wrong tag files must be place under META-INF/tags directory or its subdirctory for jar deployment.
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also think that tag files must go to tags or it's subdirectory.
 
Arvind Giri
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Guys! You are right!

I got confused with <path> element which requires full path.
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic