Jakarta Servlets: ServletContext ServletConfig and Initialization Parameters
Servlets often need access to configuration information Ewhich in turn might either be global, or servlet-specific. Such information can be passed in as initialization parameters, and is available from two sources Ethe ServletContext for global config information that is common across all servlets, and the ServletConfig for servlet-specific config information.In this course, explore the similarities and differences between the ServletContext and ServletConfig interfaces and recall their respective use cases. Conduct a simple experiment to learn the precedence rules of servlet initialization parameters, specifying these both in the web.xml file as well as through an annotation.Finally, you will analyze the use of global initialization parameters and note how precedence is determined between global and servlet-specific initialization parameters that have the same name.