• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

jsp:useBean action with beanName attribute

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

The jsp:useBean action can also optionally accept a beanName attribute which specifies the name of a bean, as expected by the instantiate() method of the java.beans.Beans class. Is this attr. coered in the SCWCD exam?

Thanks,
Reema
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen it in mock exams.
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't remember whether it was mock test or real test. But what you need to know is Bean name should not appear with the class attribute.
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Together beanName and class cannot be used inside jsp:useBean
If you use beanName then type is required.
 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding to your knowledge ...

1. It is more concerned about instantiating a serialized bean.

2. That is why we use 'type' attribute with it, to let the container know, what should the bean be casted to.

3. Also, 'class' is not mentioned because 'class' is more towards creating a new instance when one doesn't exist. But here, we want to bring a serialized bean (existing bean) back into action.

I am sure about '1'. Points '2' and '3' are my extrapolation.
[ December 28, 2006: Message edited by: Manikandan Jayaraman ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic