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.
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.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
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.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
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!
Do not set lab on fire. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking