File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Web Component Certification (SCWCD/OCPJWCD)
Joined: May 15, 2005
Sep 02, 2006 22:44:00
<jsp:useBean id="person" type="foo.Employee">
<jsp:setProperty name="person" property="name" value="fred" />
What happens if the
code looks like;
foo.Person p = new foo.Employee();
This is the question on page 416 of HFS
My questio is, that in usebean we mention type to be "foo.Employee"
but in servlet we have type foo.Person... is this not an error..
SCJP 1.4, SCWCD 1.4, SCBCD 1.5
Joined: Apr 25, 2006
Sep 04, 2006 07:11:00
Even though the reference type is Person in servlet but the object is of type of Employee.
So, you can mention reference type as Employee in usebean.
I agree. Here's the link:
subject: page 416
Bean related exercise question
Polymorphism of the jsp:useBean
Is this an error in HFSJ ??
bean-related standard actions exercise
jsp:useBean standard action doubt
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014