A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Introducing JavaFX 8 Programming
this week in the
Web Component Certification (SCWCD/OCPJWCD)
jsp:useBean action with beanName attribute
Joined: Jan 26, 2006
Dec 27, 2006 19:48:00
:useBean action can also optionally accept a beanName attribute which specifies the name of a bean, as expected by the instantiate() method of the
class. Is this attr. coered in the SCWCD exam?
Joined: Apr 22, 2006
Dec 27, 2006 20:29:00
I have seen it in mock exams.
Dilshan Edirisuriya SCJP1.4, SCWCD1.4, SCBCD 5
Joined: Oct 12, 2006
Dec 27, 2006 22:14:00
I couldn't remember whether it was mock
or real test. But what you need to know is Bean name should not appear with the class attribute.
Joined: Feb 07, 2005
Dec 27, 2006 22:37:00
Together beanName and class cannot be used inside jsp:useBean
If you use beanName then type is required.
Joined: Sep 15, 2004
Dec 28, 2006 01:46:00
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 ]
Regards,<br />Mani<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (94%)
I agree. Here's the link:
subject: jsp:useBean action with beanName attribute
difference between Class attribute and beanName attribute of jsp:useBean
Question regarding useBean . . .
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015