Explain ServletConfig and ServletContext. code example
Example: servletcontext and servletconfig
The ServletConfig parameters are specified for a particular servlet and are unknown to other servlets. It is used for intializing purposes.
The ServletContext parameters are specified for an entire application outside of any particular servlet and are available to all the servlets within that application. It is application scoped and thus globally accessible across the pages.