Some of the differences between ServletConfig and ServletContext are:
ServletConfig is a unique object per servlet whereas ServletContext is a unique object for complete application.
ServletConfig is used to provide init parameters to the servlet
whereas ServletContext is used to provide application level init
parameters that all other servlets can use.
We can’t set attributes in ServletConfig object whereas we can set
attributes in ServletContext that other servlets can use in their
implementation.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Some of the differences between ServletConfig and ServletContext are: