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?

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 &lth1&gtsome message&lt 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 variablemust 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

SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]Performance is a compulsion, not a option, if my existence is to be justified.

Sayak Banerjee

Ranch Hand

Posts: 292

posted 9 years ago

HFSJ never tells about the DD syntax that should be used to configure two listenrs.

HFSJ uses an 80-20 approach....it's a book, not the spec. itself.....a mere inspection of the spec.s would clear all your doubts

Turn on, tune in, drop out.

Niranjan Deshpande

Ranch Hand

Posts: 1277

posted 9 years ago

HFSJ uses an 80-20 approach....it's a book, not the spec. itself.....a mere inspection of the spec.s would clear all your doubts

yes...yes !

SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]Performance is a compulsion, not a option, if my existence is to be justified.

Sanjeev BhimaRao

Ranch Hand

Posts: 71

posted 9 years ago

Thanks for sharing the experience Niranjan. Yes. Certain questions cannot be just answered by just reading HFSJ alone.