You have implemented an Front Controller for your web application. The controller servlet needs to pass some config variables specific to CustomerManagerServlet. The config data must be passed, whenever CustomerManagerServlet called. The data may not be required for any other servlets.
In which object can the data that controller shares with CustomerManagerServlet be stored?
a. HttpSession
b. ServletConfig
c. ServletContext
d. HttpServletRequest
e. HttpServletResponse
Explanation:
Choice D is correct
Forward request will have the same HttpServletRequest object. We can store values in HttpServletRequest to communicate to other servlets.
I don't think I can forward the initial
servlet config values from Controller to CMSerlvet.
My code example:
In the question, the config variables specific to CMServlet make me think those are the servlet's initial parameters.