ServletRegistration.Dynamic can be used to configure (Choose two)
A.
Filter mappings
B.
add init params
C.
set asyncSupported to true
D.
add Listeners
Explanation:
http://www.softwareengineeringsolutions.com/blogs/2010/08/01/ (3rd paragraph)
ServletRegistration.Dynamic can be used to configure (Choose two)
ServletRegistration.Dynamic can be used to configure (Choose two)
A.
Filter mappings
B.
add init params
C.
set asyncSupported to true
D.
add Listeners
Explanation:
http://www.softwareengineeringsolutions.com/blogs/2010/08/01/ (3rd paragraph)
B,C
A,B
B,C
A,B
B,C
A) To configure Filter mappings you can use FilterRegistration.Dynamic.addMappingForServletNames(java.util.EnumSet dispatcherTypes, boolean b, java.lang.String… strings) or FilterRegistration.Dynamic.(java.util.EnumSet dispatcherTypes, boolean b, java.lang.String… strings)
B) For adding initParams – ServletRegistration.Dynamic.setInitParameter(java.lang.String s, java.lang.String s1) or ServletRegistration.Dynamic. setInitParameters(java.util.Map stringStringMap)
C) Set asyncSupported to true ServletRegistration.Dynamic.setAsyncSupported(boolean b)
D) Add listeners with ServletContext.addListener(T t)
That means rigth answer is B and C
http://stackoverflow.com/questions/16775611/what-can-be-configured-using-servletregistration-dynamic
Registration.Dynamic has access to theses methods: InitParameters and setAsyncSupported
So B and C is the anwser.