From the API docs:
A ServletConfig object contains the servlet's configuration and initialization parameters.
The HFSJSP book explains very well about ServletConfig object's purpose to give us a servlet's init & startup parameters.
But I didn't find any discussion about "servlet's configuration parameters" in HFSJSP book. Could someone please provide some info about them?
Basically the servlet's name is the only servlet configuration the ServletConfig object provides to the servlet in addition to the initialization parameters. But we can't say that init parameters = servlet configuration...
Christophe, you can find it here:
Interface Servlet's API doc -> Method details for init(ServletConfig config) -> Parameters:
config - a ServletConfig object containing the servlet's configuration and initialization parameters
A bit down, inside the method details for getServletConfig() there is no mention of "configuration":
Returns a ServletConfig object, which contains initialization and startup parameters for this servlet.
And if ServletConfig object doesn't deals with any "configuration", then it should have been called as ServletInit object. I am sure it does deals with configuration for a servlet. But, how? What exactly a servlet configuration means??
I think, 'configuration' means providing implementation to the ServletConfig API,
Container provides the implementation to the ServletConfig interface. During initialization time it creates the object(implemented class object) and pass it to the init(ServletConfig config) method. This happens by default. If we override this method, then ServletConfig and ServletContext objects will not be available to the servlet. This will remain as normal java object. It confirms that the class is not implementing Servlet API.
This provides the essential configuration to the java class to be a 'servlet'.