aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Info on objective 10.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Info on objective 10.3" Watch "Info on objective 10.3" New topic
Author

Info on objective 10.3

Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
It says: Identify techniques that access a declared JavaBean component.
How is it different that 10.1 which talks about getProperty and setProperty?
Any idea?
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
How is it different that 10.1
Hint:
How do you call a method (say printMe() )declared in a bean class, assuming you have access to it.
regds.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
<jsp:useBean id="abc" .../>
<%
...
abc.methodX();
...
%>
Is this what you mean? But a bean is not supposed to be used this way.
Manjunath Subramanian
Ranch Hand

Joined: Jul 18, 2001
Posts: 236
I think 10.3 refers to the various attributes of a <jsp:useBean> tag like id,class,type,beanName.
As the statement indicates ,it refers to
1)the need to know the different ways of creating and using a JavaBean component.
2)to understand constraints like we cannot use "class" and "beanName" attributes together in a <jsp:useBean> tag and so on..
Hope this helps,
Manjunath
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Is this what you mean?

I was thinking yes.
But a bean is not supposed to be used this way.
Michell's notes says,

A declared java bean can also be accessed using:
scriptlets
Expressions
Custm Tags

And sure the code you posted is a scriptlet.
So yes. IMO, the issue is not whether you are supposed or not?
It is "Can you access the bean like this or can't you?"
My answer is "Yes, JSP allows such access."
Other thoughts please.....
Thanks.
- satya
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
I don't expect that exam is about good programming practice. So I will try to take every possibility into consideration. If its possible to access JavaBean method by scriptlet I will mark it, although its bad programming practice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Info on objective 10.3