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



Leave a Reply 4

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


manish

manish

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

giuseppe

giuseppe

therefore B and C, if It were FilterRegistration.Dynamic you wouldwere be right with 3 options.

ZdeDu

ZdeDu

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)