This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes beanName Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "beanName" Watch "beanName" New topic
Author

beanName

Dilshan Edirisuriya
Ranch Hand

Joined: Apr 22, 2006
Posts: 299
what is the purpose of using beanName attribute in <jsp:useBean >


Dilshan Edirisuriya SCJP1.4, SCWCD1.4, SCBCD 5
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Dilshan Edirisuriya
Ranch Hand

Joined: Apr 22, 2006
Posts: 299
Thank you
Bhavik Patel
Ranch Hand

Joined: Jul 12, 2004
Posts: 155
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..


SCJP 1.4<br />SCWCD 1.4(91%)<br />Working on SCJD -Bodgitt & Scrapper Constructions...<br /> <br />"It takes 43 muscles to frown & 17 to smile but it doen't take any to just sit there with a dumb look on your face .. Keep Smiling "
Dilshan Edirisuriya
Ranch Hand

Joined: Apr 22, 2006
Posts: 299
Thank you It really helped me
Dilshan Edirisuriya
Ranch Hand

Joined: Apr 22, 2006
Posts: 299
Thank you It really helped me
 
wood burning stoves
 
subject: beanName