I have a web application which has two servlets that exchange information through context attributes.
Each servlet depends on the information that the other servlet sets in the context attributes. For example if I first access servlet S1, I need to access information that is provided by servlet S2, through context attributes, I make a request (through URLConnection
) to S2.
I need servlets S1 and S2 to start (be initialized) at application launch, not when a request is made to them.
Is there any configuration I can make, so that all servlets in my application are initialized at launch time?