Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes page 356  HSFJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "page 356  HSFJ" Watch "page 356  HSFJ" New topic

page 356 HSFJ

abhishek tiwari

Joined: Aug 08, 2005
Posts: 19
hi guys,
i have the following doubt from HSFJ(Page number 356):-

servlet code

foo.Employee p = new foo.Employee();

standard action

<jsp:useBean id="person" type="foo.Employee" >

<jsp:setProperty name="person" property="name" value="Fred" >

</jsp:useBean >

Name is : <jsp:getProperty name="person" property="name"/>

Output is Name is Evan

the person attribute is stored in the request scope in the servlet code whereas the standard actions looks for it in the default scope i.e the page don't you think we should have a compile time error.

kindly solve my problem at the earliest

thanks in anticipation

when the going gets easy,you are going downhill.......<br /> <br />abhishek tiwari<br />scjp 93%<br />scwcd in progress
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You are correct. That attribute shoild not be available to the JSP, since it's using the default scope of "page". It's probably a typo in the book.

So much trouble in the world -- Bob Marley
Edmund Yong
Ranch Hand

Joined: Nov 16, 2003
Posts: 164
It is an error. Check the errata.

SCJP 1.2, SCWCD 1.4
subject: page 356 HSFJ
Similar Threads
HFSJ doubt :Pg:356
Whats the error???
Is this an error in HFSJ ??
doubt in page 356 of HFSJ
Head First Servlets and JSP:SCWCD Question