• 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 in type and class attributes of Jsp:useBean

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I checked the "Jsp Parameter Standard Actions" present in the FAQ,when i saw the genrated servlet
the actuall setter methods are not called,rather a introspectionhelper is called

however actual getXXX() methods are called


but as we see the refrence type is always downcasted to actual instance type so we dont get any compile time error in JSP as we think


so the rule is when ever we have type="SuperClass" and class="SubClass" it will downcast and everything will be fine.If there are any
problem with super and subclass relation then it will endup with class castException.

Is my understanding correct if not please correct me.

Thanks
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by raja ram:
so the rule is when ever we have type="SuperClass" and class="SubClass" it will downcast and everything will be fine.If there are any
problem with super and subclass relation then it will endup with class castException.

Is my understanding correct if not please correct me.

Thanks[/QB]



it is know as up casting not a downcasting..


suppose,

type= "subclass" class="superclass" means the

you will get Translation Error
 
reply
    Bookmark Topic Watch Topic
  • New Topic