Various servlets or various webapps?
Various servlets is trivial, indeed using ServletContext.getAttribute().
Various webapps is more difficult:
- you need to set cross context so that context.getContext("/ otherpath") is accessible (a config of context in tomcat)
- you need classes to be shared (put jars in lib in tomcat)

Instead of context.getAttribute() you can always use statics....

paul


Le 21-avr.-09 à 20:29, David Seltzer a écrit :

I'm going to try storing a persistent manager class in the
ServletContext so I can access it from the various servlets. It's not a
100% solution, but I think it'll strike the right balance between
madness and a series of increasingly annoying if-statements. :-)

Unless there's a reason that's a bad idea... The only thing I can think
of is that I need to make sure that one servlet is responsible for
setting it up and disposing of it.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to