There are actually 2 types of init parameter for a servlet
This statement may be incorrect or not accurately phrased. ServletConfig and ServletContext are 2 different objects. Just that context initialization parameters are available any servlet in that web application.
The parameter thas is set by setAttribute() is available to any servlet that is part of the same web application.[SRV3.4]
Thanks,
Hema
Agreed that objects bound to ServletContext via setAttribute() is available to any servlet. But, in a distributed environment, where the same application is deployed on multiple servers, there will be one context object per JVM.
Parameters bound to context on one JVM will not be available to servlets of the same application running on a second JVM.
So - ServletContext may not always be the right place to store global information for use by getAttribute()....