• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mandatory elements of the tagLibrary

 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • 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
 
Elan Ram
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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.
 
Andriy Fedotov
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • 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?
 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • 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
 
Ash More'
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic