Multiple choice technology architecture

Which statements about ServletContext initialization parameters are not true?

  1. They should be used for data that changes rarely.

  2. They can be accessed using ServletContext.getInitParameter()

  3. They can be accessed using ServletContext.getParameter()

  4. They should be used for data that is applicable to an entire web application.

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

Option C is FALSE (making it the correct answer to 'which is NOT true') because ServletContext has no getParameter() method - the correct method is getInitParameter(). Options A, B, and D are all TRUE: ServletContext init parameters are configured in web.xml, meant for data that rarely changes (like database connection strings), are application-wide (shared by all servlets), and are accessed using getInitParameter(String name).getParameter() methods exist on HttpServletRequest, not ServletContext.