ServletRegistration.Dynamic can be used to configure (Choose two)

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)



Leave a Reply 7

Your email address will not be published. Required fields are marked *


LeoCode

LeoCode

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

Allan Santos

Allan Santos

Registration.Dynamic has access to theses methods: InitParameters and setAsyncSupported

So B and C is the anwser.