• 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

custom tag libraries

 
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

currently i am working on custom tag libraries. i wrote a tag library and tried to configure it in web.xml. but <taglib> is not allowed in web.xml. I am using servlet 2.5 specification. please guide me.

Thanks
Vipul Kumar
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Including taglib elements in the web.xml deployment descriptor is hardly ever necessary. If the .tld files are in the right location they will be discovered 'automagically'.
Anyway, as of version 2.4 of the servlet specification the xml schema definition for web.xml has changed and become more stringent. You can still add taglib elements to it, but the must be child elements of a parent element called jsp-config. Though I'd recommend you simply put the .tld files in the proper location for auto-discovery, and not include them in the web.xml explicitly.
 
vipul John
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jelle Klap.

 
vipul John
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I kept the tld file in WEB-INF folder. i used uri in tld file to locate the tld. It worked.

Thanks Jelle klap.

can you also tell me what are the other places where we can keep our tld files so that server automatically detects.

Thanks,
Vipul Kumar.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well in the WEB-INF folder, as you already figured out, but also any subfolder of WEB-INF.
There's also the option of including .tld files in the META-INF folder inside JAR files in WEB-INF/lib.
 
vipul John
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jelle Klap wrote:Well in the WEB-INF folder, as you already figured out, but also any subfolder of WEB-INF.
There's also the option of including .tld files in the META-INF folder inside JAR files in WEB-INF/lib.



Thank You Very Much!
reply
    Bookmark Topic Watch Topic
  • New Topic