How do I define an environment variable that can be accessed in all servlets in a Web application ?
A J2EE application may require one or more initialization parameters to be accessed by one or more servlets in a web application. An initialization parameter be for a context or for a specific servlet. The context level parameters can be accessed by any servlets in the web application. a) To define a context parameter you have to add in the following in the web.xml as follows:
A J2EE application may require one or more initialization parameters to be accessed by one or more Servlets in a web application. An initialization parameter be for a context or for a specific servlet. The context level parameters can be accessed by any servlets in the web application. 1. To define a context parameter you have to add in the following in the web.