• 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

mandatory elements of the tagLibrary

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


I think the answer is 1

But the answer given as all the four..? Is it Correct..?
From http://www.javaranch.com/carl/SCWCD.htm
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per JSP 1.2 Spec, tlib-version, jsp-version, short-name, tag elements are mandatory elements in tld file.
But JSP 2.0 only tlib-version, short-name are mandatory elements. But we can omit the short-name element, in some container eg: Tomcat.
For exam purpose, stick with spec.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
according to http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd

<xsd:element name="tlib-version" type="j2ee ewey-versionType">
<xsd:element name="short-name" type="j2ee:tld-canonical-nameType">
<xsd:element name="uri" type="j2ee:xsdAnyURIType" minOccurs="0">

so,

in taglib only tlib-version and short-name are mandatory, right?
 
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I never used short-name in my tld and it runs like a charm.
I think only tlib-version is mandatory.

best regards,
omi
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well tlib-version and short-name are mandatory. Its better to have both of them, so as not to run into problems when we run in other containers. Plus including the short-name is a good practice, as its used by IDE's to provide default prefix for tags.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic