This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubt about jsp:useBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doubt about jsp:useBean" Watch "doubt about jsp:useBean" New topic
Author

doubt about jsp:useBean

Victor Maehira
Ranch Hand

Joined: Mar 08, 2007
Posts: 33
Good morning!
I was solving a mock, when I faced the following question:

A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page? (Choose two)
A. id
B. type
C. name
D. class
E. scope
F. create

The answer is B! It is incorrect, firstly, because the question says "choose two"! Moreover, I believe the correct answer should be A and D.
The id and the class is enough to access the bean ONLY in that page. What do you think?
Thanks!
Ezhil S Alagesan
Greenhorn

Joined: Aug 31, 2007
Posts: 3
Yes, your options seems to be correct. :roll:

'id' is a mandatory field.

Then 'class' and 'type' comes into picture.

Out of them 'type' cannot be used to instantiate a bean.


I can, But I won't
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
yes, and without the scope it wil ldefault to the page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt about jsp:useBean