Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ- CH : 10 Q: 17 ??

 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I have a slight confusion on q17 of chapter 10.
Question:
given tag : SimpleTag --> Handler --> SimpleTagHandler
ClassicTag --> Handler --> ClassicTagHandler
Both the tag are declare to be non empty and non tag dependent.
which of the following is/are valid, I understand the answer but dont understand the following options:

<my:SimpleTag>
<%= displayText %>
</my:SimpleTag>

and

<my:SimpleTag>
<my:ClassicTag>
<% i++; %>
</my:ClassicTag>
</my:SimpleTag>


According to the book, these options are wrong. but i think these are correct.

Reason Why i think so:
as both the tag's body is non empty and non tag dependent.
this means body content is either JSP or Scriptless.
as it is not given in the question so above two options should be valid in case when body content is JSP.
however if body content is scriptless, then both above options should be wrong.
 
sudhakar karnati
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
given tag : SimpleTag --> Handler --> SimpleTagHandler
ClassicTag --> Handler --> ClassicTagHandler
Both the tag are declare to be non empty and non tag dependent.


Hi Sunny,

i think you are referring to HFSJ 1st edition if yes please refer to the errata for this and it says:

[567] question 17;
Both tags are declared to be non-empty in the TLD.
should read:
Both tags are declared to be non-empty and non-tag dependent in the TLD.


and one more thing regarding this question is Simple tags cannot have scripting in their body.Please check this link

Thanks
Sudhakar
 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Xie xie...! I got it..!
 
Paulo Marcio Brandi Rezende
Ranch Hand
Posts: 34
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, what is the meaning of "Xie xie...!"?
 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In mandrin, It means "Thank you"..! I am very passionate to learn Chinese..!
So i Often use xie xie( Pronounce as "C C A(a very light sound of a))" in place of thank you..!
I am sorry, if you didn't get it..1
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic