aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Q 15 from chap 10 of HFSJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Q 15 from chap 10 of HFSJ" Watch "Q 15 from chap 10 of HFSJ" New topic
Author

Q 15 from chap 10 of HFSJ

vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
Which is the most efficent JspContext method to call access an attribute that is known to be in application scope
a)getPageContext()
b)getAttribute(String)
c)findAttribute(String)
d)getAttribute(String,int)
e)getAttributesScope(String)
f)getAttributeNamesInScope(int)
answer is d..
but in the explanation of answer it was given "option F is invalid because no such method exists"
but it is there in JspContext class...Am i correct??
Gouri Bargi
Ranch Hand

Joined: Sep 29, 2002
Posts: 47
Hi Vijaya,

Please check the HFSJ errata. The explanation of option E and F has got interchanged.

- Gouri
vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
gowri thanx...
but int getAttributesScope(String) is also there in JspContext class..
it returns Scope of the attribute given ..
Gouri Bargi
Ranch Hand

Joined: Sep 29, 2002
Posts: 47
Hi Vijaya,

You are right - getAttributesScope(String) method is also present in JSPContext.

- Gouri
Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
oh.....no wonder i felt something wrong with the explanation.

so getAttributesScope(String) is there in JSPContext.

should the explanation i "eliminate" on HFSJ?


From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
Rizwan Mohammad
Ranch Hand

Joined: Sep 02, 2005
Posts: 445
yes, explanation is wrong in HFSJ. There should be some forum for author to post these types of errors, so that they can take preventive action on next printing edition. I have been finding errors in this book.


Rizwan
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
i c.

i think they will do. i am expecting Head First EJB new edition , but according to Berts,said that might take about 8 / 9 / even one year to complete the new version..

good luck to all for HFSJ, i will give my test soon...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Q 15 from chap 10 of HFSJ