• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in type and class attributes of Jsp:useBean

 
raja ram
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • 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
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic