• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic