Which is true? 1. The init method for a filter is called the first time the servlet mapped to the filter is invoked. 2.A filer defined for a servlet must always forward control to the next resource in the filter chain. 3.Filters associated with a servlet are applied in the order in they appear in the DD. 4.If the init method throws unavailable exception the container will make no further attempt to execute it.
There is one right answer but I feel 2,3,4 are right.
according to me both 3 and 4 options are true option 3:since the filter follows declartive control as per design patterns. option 4:unavailable exception occurs in two conditions A servlet or filter is permanently unavailable,a servlet might be configured incorrectly, or a filter's state may be corrupted A servlet or filter is temporarily unavailable if it cannot handle requests momentarily due to some system-wide problem like there may be insufficient memory or disk storage to handle requests