This week's book giveaway is in the Spring forum. We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line! See this thread for details.
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 !
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 !
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.