Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Three flavors of taglib element.....DUH!!!

 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just realized (yup, I am slow but) there are three flavors of taglib elements.
1. taglib element in the web-app of a DD
<taglib>:
<!ELEMENT taglib (taglib-uri, taglib-location)>
2. taglib element in the TLD
<taglib>:
<!ELEMENT taglib
(tlib-version, jsp-version, short-name, uri?, display-name?, small-icon?, large-icon?, description?, validator?, listener*, tag+)>
3. and Ofcourse the taglib directive of a JSP.
For what its worth.........
- satya
[ February 17, 2002: Message edited by: Madhav Lakkapragada ]
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes me wish you could bring in the dtd's into the test room.
I have been trying to find patterns in the dtd to make it easier to learn. As in the servlet tag and the filter tags both have init-param elements with the same inner tags.
But those inconsistencies are a pain.
Mark
 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've been goimg over this too ( just 5 days before my exam...)
I've worked it out like this:
Ive got 3 layers.
The bottom layer is the .tld file which has all the machinery and logic in it - the handler class files are listed here etc.
The middle layer is the web.xml file where I tell the container about the existence of the .tld file I only tell it a handy name <taglib-uri> and the exact location <taglib-location> so the applications running in the container can reference it easily.
The top layer is the JSP page. here I declare I want to use the taglib resource by mentioning its handy name and I assign a prefix to distinguish my super tags from those plain old standard tags
Now all I have to do in my jsp pages is call my prefix and tag and that call is passed down through those layers and things happen
Hope that helps,
Terry
 
Evildoers! Eat my justice! And this tiny ad's justice too!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic