• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

HFSJ- CH : 10 Q: 17 ??

 
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Xie xie...! I got it..!
 
Ranch Hand
Posts: 34
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Heroic work plunger man. Please allow me to introduce you to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic