A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
this week in the
Web Component Certification (SCWCD/OCPJWCD)
Joined: May 15, 2005
Sep 02, 2006 22:44:00
: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
Polymorphism of the jsp:useBean
jsp:useBean standard action doubt
Is this an error in HFSJ ??
bean-related standard actions exercise
Bean related exercise question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015