Author
question on filters from head first
sid sree
Ranch Hand
Joined: Jun 28, 2007
Posts: 186
Filters support a initialization mechanism that includes an init() method that is gauranteed to be called before the filter is used to handle requests
Is this statement true or false The book states it as false I think it is true .. some please clarify It is given as one of the options for question no 5 page no 703 in the head first book Thanks
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
Servlet Specification:
The container must ensure that it has instantiated a filter of the appropriate
class for each filter in the list, and called its init(
FilterConfig config)
method. The filter may throw an exception to indicate that it cannot function
properly. If the exception is of type
UnavailableException , the container may
examine the isPermanent attribute of the exception and may choose to retry the
filter at some later time.
Thanks,
cmbhatt
Raghavan Muthu
Ranch Hand
Joined: Apr 20, 2006
Posts: 3327
The filter may throw an exception to indicate that it cannot function properly
Thanks for the details from spec chandra. The presence of aforesaid particular statement make the question posted by OP become "false". Is that right?
Everything has got its own deadline including one's EGO!
[CodeBarn ] [Java Concepts-easily ] [Corey's articles ] [SCJP-SUN ] [Servlet Examples ] [Java Beginners FAQ ] [Sun-Java Tutorials ] [Java Coding Guidelines ]
sid sree
Ranch Hand
Joined: Jun 28, 2007
Posts: 186
The question only asks if the init() method is called or not ... rather than completes or not !! So... i think its still true even in the light of the new info !!! But the book says its false !! So need more clarifications !! Thanks
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted Aug 01, 2007 07:28:00
0
What happens when you try to code these situations yourself? What behavior do you observe?
subject: question on filters from head first