Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

beanName

 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers

I have a doubt (This is not covered in the HFSJ)

what are the rules to use the 'beanName' attribute of the 'useBean' tag??

thanks in advance
 
Sandeep Chhabra
Ranch Hand
Posts: 340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The attribute beanName specifies the name of a Bean, as specified in the
JavaBeans specification. It is used as an argument to the instantiate() method in
the java.beans.Beans class. It must be of the form �a.b.c�, which may be either a
class, or the name of a resource of the form �a/b/c.ser� that will be resolved in the
current ClassLoader. If this is not true, a request-time exception, as indicated in
the semantics of instantiate() will be raised. The value of this attribute can be a
request-time attribute expression.


This is an extract from JSP 2.0 Spec.
 
Sandeep Chhabra
Ranch Hand
Posts: 340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
beanName is basically the name of a Bean, as expected by the instantiate()
method of the java.beans.Beans class.

Hope this helps.
 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should it be used with only 'type' attribute of the tag??
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Originally posted by sudhana madhu:
Should it be used with only 'type' attribute of the tag??


Yes The 'type' attribute is mandatary with 'beanName'.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic