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?
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.
posted 4 years ago
This is another example I can do to forward a request with attributes from a servlet to another.
But I don't see any example that the initial parameters of one servlet can be forward to another, like the question mentions.
If I understand the question well, you will have to retrieve those config variables in the FrontController and store them (as attributes) on the HttpServletRequest before forwarding to the CustomerManagerServlet.
Good night. Drive safely. Here's a tiny ad for the road:
Devious Experiments for a Truly Passive Greenhouse!