1. when you use
jsp:attribute to pass attributes to a custom tag whose body
is declared to be empty, note the
following usage -
<mine:customTag>
<jsp:attribute name="attrName">attrValue</jsp:attribute>
</mine:customTag>
or
<mine:customTag>
<jsp:attribute name="attrName">${someScopedVar}</jsp:attribute>
</mine:customTag>
or
<mine:customTag>
<jsp:attribute name="attrName">
<!-- some custom tag invocatin that retrns some value -->
</jsp:attribute>
</mine:customTag>
Note the the <jsp:attribut> does not have a attribute called "value", so
the following is invalid -
<mine:customTag>
<jsp:attribute name="attrName" value="attrValue></jsp:attribute>
</mine:customTag>
I choose this in the exam
2. Suppose my web app uses two listenrs, how do i configure it in D.D ?
OR as -
well.. the second option is correct ( please verif this guys ) as per the
exam engnie. HFSJ never tells about the DD syntax that should be used
to configure two listenrs.
3. this is the most amazing thing. all these arevalid sub elements for
the <tag> element in a TLD
<required>true</required> is same as
<required>yes</required>
<required>false</required> is same as
<required>no</required>

is it ? didnt check the specs
4.this is a relly good question on the <c out>
Assuming that the following line of code has already occured in a
scriptlet in a JSP page, which of the given JSTL code snippet will output
the right
string in the resulting HTML so that the message in 'htmltext'
is displayed in HEAD1 style on the browser?
request.setAttribute("htmltext", "<h1>This is heading</h1>");
Select 2 correct options
a <c

ut value="${htmltext}" escapeXml='true'/>
b <c
ut value="${htmltext}" escapeXml='false' /> c <c

ut value="${htmltext}" />
d <c

ut value="${htmltext}" escape='true' />
e ${htmltext}
General Comments
A feature of the 'out' tag is that it performs XML character-entity
encoding for <, >, &, ", and ' automatically (by default). This means
that a < will be automatically encoded to < and a > will be encoded to
> and so on. In this case, however, we do not want this feature
because we want to write <h1> and </h1> in the output. Therefore, we need
to supress this feature by specifying escapeXml='false'. By default, ie.
if do not specify this attribute, it is assumed to be true that's why
option 3 will not work.
Option 5 will work because it writes to the output exactly whatever is
there the string.
to add to it...in short...if the escapeXML="true" then
the <h1>som message</h1> wll rendered as
<h1>some message< in the response
but we want it as
some message prined in HEAD1 style, so the response must be rendered as
<h1>som message</h1> for the browser to interpret as a Heading 1
5. no here comes the real thing -
i have this code in my JSP-
what code should i write in the tag handler so that it inrements a count
for each nesting level and shows the finlai result as 3.
case 1 - using classic tag handler
classic tag instances are reused by the container, so the tag handler
should / should not use a 'static' count variable..and increment
it and print in the doStartTag( ) method.
case 2 - using simple tag handler
simple tag intances are not reused by container. each time we use it
in the JSP, a new instance is created. in that case, the count variable
must be 'static' and and increment and print in the
doTag( ) method.
in either of the case, the count varible
must not be 'local' hope you guys get what i am saying. the concerned hfsj page is - 539.
expectig comments on my post
thanks