File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q 15 from chap 10 of HFSJ

 
vijaya bacina
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijaya,

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

- Gouri
 
vijaya bacina
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gowri thanx...
but int getAttributesScope(String) is also there in JspContext class..
it returns Scope of the attribute given ..
 
Gouri Bargi
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijaya,

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

- Gouri
 
Nicky Eng
Ranch Hand
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh.....no wonder i felt something wrong with the explanation.

so getAttributesScope(String) is there in JSPContext.

should the explanation i "eliminate" on HFSJ?
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nicky Eng
Ranch Hand
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic