Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

beanName

 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the purpose of using beanName attribute in <jsp:useBean >
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you specify a beanName, the container will instanciate a new bean by using java.beans.Beans's instantiate() method.
You should check the API of this class to understand what this beanName means.
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you have a serialized bean as .ser that you want to use as a bean instead then beanName can be used...class or beanName can be used .. not both at a time..beanName can take runtime value(in scriplet expr or EL expr) whereas class attribute can not take runtime value...you can replace class attribute with beanName but beanName can not be replaced by class attribute as beanName provides some extra functionalities(loading serialized bean,run time values ) that class attrib doen't.hope it will help..
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you It really helped me
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you It really helped me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic