I got a bunch of servlet context listeners in my Java webapp, each of them gathering some information about the environment.
Some of them depend on information which is gathered by another listener. But I can't determine the order in which the listeners are registered and called, so I have to duplicate code.
I understand that the listeners are registered in the order their order in web.xml but this sounds a bit vague to me, too vague to rely on it.
Do you have a hint how I can solve my problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…