The variable directive is analogous to the <variable> element in the Tag Library descriptor, and defines the details of a variable exposed by the tag handler to the calling page.
Regards,<br />Sourin.
Thanks <br />Poonam Agarwal SCWCD 86%
For example, you define a variable in your tag file, let's say, myTag.tag, like this :
<%@ variable name-given=”date” variable-class=”java.util.Date” %>
And then you invoke it in your jsp :
<tag:mytag>
${date}
</tag:myTag>
So basically, the variable directive is giving you information as to what kind of variable you are going to use and its implementation details.
Thanks <br />Poonam Agarwal SCWCD 86%
Thanks <br />Poonam Agarwal SCWCD 86%
Poonam Agarwal wrote:
hey is somebody noticed the bold line... this is also valid, then why not included in the given options...
it is used to define the attributes for the tag file , just like a <attribute> sub-element of a <tag> element for the tag handler(custom tags).
Regards,<br />Sourin.
Poonam Agarwal wrote:
hey Sourin,
could you please expain this in more detail. even i have some doubt regarding thee <%@ variable%> directive. I understand that this is used to expose the scripting variable used by the tags in JSP file,
1. But what is need to do so, can't we declare a variable itself in the JSP file.
2. <variable> element and <%@variable%> directive are same. Please give an example to explore this.
Thanks In advance
Poonam
Regards,<br />Sourin.
sravanthi pulukuri wrote:hi,
2nd Question iam not justified with the Answers.
Regards,<br />Sourin.
Thanks <br />Poonam Agarwal SCWCD 86%
sravanthi pulukuri wrote:hi,
Thanks for the reply.
But complex tags is supposed to be non empty rite??
for answer A it is empty tag is it?
Regards,<br />Sourin.
sravanthi pulukuri wrote:hi,
Thanks for the reply.
But complex tags is supposed to be non empty rite??
for answer A it is empty tag is it?
Thanks <br />Poonam Agarwal SCWCD 86%
sravanthi pulukuri wrote:hii,
Both tags are declared to be non-empty and non-tag dependent in the TLD.
this is what i mean
<my:simpleTag>
<my:complexTag />
</my:simpleTag then how come this is true.. complextag should have body rite??>
Thanks <br />Poonam Agarwal SCWCD 86%
sravanthi pulukuri wrote:hii,
Both tags are declared to be non-empty and non-tag dependent in the TLD.
this is what i mean
<my:simpleTag>
<my:complexTag />
</my:simpleTag then how come this is true.. complextag should have body rite??>
Regards,<br />Sourin.
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|