• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ errata confusion

 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed


[637] Case 2;
The second row should not have Diane and Annie crossed out.
All of these users would have permission to use the webapp.

Can anybody explain how does the container get AI to make such a logical
decision that if Guest is allowed then admin and Member should be allowed ??
 
prajal Mehta
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shiraz Khan:
http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed


[637] Case 2;
The second row should not have Diane and Annie crossed out.
All of these users would have permission to use the webapp.

Can anybody explain how does the container get AI to make such a logical
decision that if Guest is allowed then admin and Member should be allowed ??

Hi,

If we see the pictures of Diane, Annie on that page (p 637), one of them is GUEST AND MEMBER and other one is GUEST and MEMBER and ADMIN.
And the third person, is only a GUEST.

So, when we say <role-name>Guest</role-name> , all of the three are allowed access.
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ooops I had forgot that
Thanks
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
errata says :

[136] 3 changes on this page;
Third hand-written note from the top should read:
The forward slash at the beginning means "relative to the root of the web container."

Isn't this a deviation from standard ?? Why would anybody place any resource outside the root of web app i.e. at the root of web container ?
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more doubt in HFSJ page 336, question 6 : if EL is ignored in the page directive then whatever is specified in DD should not matter. Correct answer should be D
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another doubt in custom tag development page 564 q 12 option D : what is meant by fragment invocation ? Is it same as calling setJspBody method ?
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doubt regarding tag files page 567 q 18 option F : on page 494 in bang box it is mentioned that all tag attributes have tag scope, whereas in option F it says that for each attribute declared in tag file container createss a page scoped attribute with same name !
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doubt in filters page 700 q 1 option D : it says the only way a filter can be invoked is through a declaration in DD .. I think this sentence is incomplete and vague because unless doFilter is called inline or through container callback its not guarenteed to get invoked ! There can be a case where a filter can block next filter which is configured in DD. So there is no surety that just by declaring in DD filter will be invoked !
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Filters page 703 q 5 option E : i think this is correct answer and the comment contradicts the assumption in the option "in order to ensure that all the filters have a chance to execute"
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another doubt from the final mock test in HFSJ
Page 828 Q 55 Here setAttribute is getting called twice on the attribute with the same name and same value.

According to the APIs
void setAttribute(String name,
Object value)

Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.

After this method executes, and if the new object implements HttpSessionBindingListener, the container calls HttpSessionBindingListener.valueBound. The container then notifies any HttpSessionAttributeListeners in the web application.

If an object was already bound to this session of this name that implements HttpSessionBindingListener, its HttpSessionBindingListener.valueUnbound method is called.


So, as per my understanding the first answer B is wrong .. It can't be BBXXXX
Rather it should be BUBXXXXX


Please comment on all of the above doubts in HFSJ as I am not able to find them in errata. Also correct me if I am wrong.
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody awake ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic