Multiple choice technology programming languages

Which element of the servlet element in the deployment descriptor is used to specify the parameters for the ServletConfig object. Select the one correct answer.

  1. servlet-config

  2. init-param

  3. load-on-startup

  4. filter

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The init-param element within servlet defines initialization parameters that are accessible via the ServletConfig object. These parameters are specified as name-value pairs and retrieved using getInitParameter() method in the servlet.