• 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

TLD Doubt

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



Is <tlib-version> and <short-name> mandatory ?
Moreover what about <uri> and <tag> elements. Are they mandatory?


(tlib-version? | uri? | tag?)*

What does this mean. What does '?' mean
[ March 20, 2008: Message edited by: Sandeep Vaid ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is <tlib-version> and <short-name> mandatory ? Moreover what about <uri> and <tag> elements. Are they mandatory?


In JSP2.0, only tlib-version and short-name only are mandatory.

(tlib-version? | uri? | tag?)* What does this mean. What does '?' mean


'?' means that the tag is optional (zero or one occurance). (tlib-version? | uri? | tag?)* is strange. Where did you get it from ?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sandeep DTD for taglib is :
<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
display-name?, small-icon?, large-icon?, description?,
validator?, listener*, tag+) >

? : At most once, not required
* : Any Number of time, not required
+ : At least once, required and any number of time
nothing : required and once

So, For taglid the required attributes are :
1>tlib-version
2>jsp-version
3>short-name
4> At leat one tag
I think it helps...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jsp-version ? You are looking at an old DTD. The new 2.0 schema does not specify any jsp-version. Could you tell us which TLD version you are referring to ?
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys...
I also got same conclusion as sujit :

<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?, display-name?,
small-icon?, large-icon?, description?, validator?, listener*, tag+) >

We are refering to
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

This is specified in JSP2.0 Specs and according to this jsp-version is also mandatory !!!
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think you people are referring to the wrong TLD .The TLD which you specified is for JSP1.2 version. In JSP 2.0 only tlib-version ,short-name tags are mandatory.This is provided in JSP specification.Refer to the page-400
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
swapna, you are right...
I also posted this but it seems there was a internet connection problem and it didn't got reflected in the forum.


Thanks to you all for clarifying my doubt !!!
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic