ServletRegistration.Dynamic can be used to configure (Choose two)
A.
Filter mappings
B.
add init params
C.
set asyncSupported to true
D.
add Listeners
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
B and C
A and B is correct…
–>> Registration== initialization parameters
–>> ServletRegistration extends Registration ==Url-mapping
–>> ServletRegistration.Dynamic extends ServletRegistration == setLoadOnStartup, setMultipartConfig, setRunAsRole(java.lang.String roleName), setServletSecurity(ServletSecurityElement constraint)
–> Registration.Dynamic extends Registration ==setAsyncSupported
therefore B and C, if It were FilterRegistration.Dynamic you wouldwere be right with 3 options.
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)