• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt on Tag Handlers

 
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have the following doubt in this jsp page:
<my:tag1>
<my:tag2>
<my:tag3/>
</my:tag2>
</my:tag1>
The tag handler for my:tag1 is Tag1Handler and extends TagSupport. The tag handler for my:tag2 is Tag2Handler and extends SimpleTagSupport. The tag handler for my:tag3 is Tag3Handler and extends TagSupport.

Now, how is it possible by Tag3Handler to use getParent method twice to gain access to the instance of TagHandler?

Can you clarify this?
With regards,
Padma priya N.G.
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

Its not possible by using getParent method twice.


Regards,

Amit Goyal
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
That was the reply given in HFSJ in Page no:560(3rd Question).
With regards,
Padma priya N.G.
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe I have the wrong HFSJ but in my version it says that you can use the getParent method twice for getting access or I misunderstand.
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The errata for the book states

[550] question 3;
Option C is invalid.
Unfortunately, that leaves us with a mock question that doesn't have a valid answer.

You should go to the books errata on the Head First website and download all the mistakes and corrections. I found many when I used the book to study for the exam.

Also, when in doubt code the example or mock question and see if the answer is correct.
 
Remko Strating
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.. I will download the errata.

I don't want to learn something wrong...
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
What is the web-site of headsfirst?
With regards,
Padma priya N.G.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Google "head first books" to get the link
 
permaculture is giving a gift to your future self. After reading 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