Which of following are mandatory in TLD file? a) tlib-version b) jsp-version c) short-name d) tag e) uri
I'm confused by answers from different source. I remember HFSJ said a,c,e is required, but I did see many TLDs (maybe even HFSJ if I am right) don't include short-name; Some other authors said they all are mandatory!! I can't agree with this, jsp-version is mandatory??
According to tld from jsp spec tlib-version, jsp-version and short-name are mandatory. Straight from jsp spec, <!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?, display-name?, small-icon?, large-icon?, description?, validator?, listener*, tag+) >
from this i understand that tlib-version, jsp-version, short-name are mandatory. correct me, if i am wrong.
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Joined: Mar 16, 2005
I guess you are right. jsp-version become required in JSP1.2. The funny thing is the spec of JSP1.1 & 1.2 both states short-name as mandatory in [!ELEMENT...], however it didn't mention this in the following description. At least I only saw "This element is mandatory/required" for tlib-version and jsp-version.
Accoring to TLD XSD for JSP 2.0, only tlib-version and short-name is required. tag and uri are defined optional and there is no jsp-version attribute in XSD for 2.0 as the taglib xml tag itself contain the version="2.0" mandatary attribute.
Each version changes so much! What on earth is the answer? In practice I wrote my own test TLD, w/out short-name, w/out jsp-version, it worked perfectly on tomcat5.5 It seems nothing is required!
What this exam tests? JSP1.2 or 2.0?
Joined: Dec 04, 2004
The SCWCD 1.4 exam test JSP 2.0
In practice I wrote my own test TLD, w/out short-name, w/out jsp-version, it worked perfectly on tomcat5.5
Have to used the tags definded in test tdl ? The XML elements like web.xml, tlds are not validated at the time of creating the .war files or at deplyment time. But there is server error , if something goes wrong at run-time or simply ignored the un-wanted stuff.
If you are using any IDE to write your application, there is XML validation. It validate your XML against DD or XSD.