Servlet filters are the best way to solve this. Where do you get stuck with filters?
Cheers, Kees de Kooter http://www.boplicity.net On Sun, Feb 1, 2009 at 23:55, Ray Holme <rho...@roadrunner.com> wrote: > I have a few web applications being moved to tomcat. They all share some > commonality - I use Firebird not MySQL; I built my own ConnectionManager > long ago; and all three have an Application wide bean for shared > resources. Each user has a "UserInfo" bean (whether or not they log in > is important and can be found, but all functions require the common > resources and it is a VERY convenient place to put them) from which > hangs a DB-Connection bean and an Application bean. This enables > resources to be pooled (connections) and shared (Application). > > Perhaps due to lack of knowledge, I try get the session's UserInfo > (getAttribute(..)) and on failure intstantiate a new one in hundreds of > servlets and/or JSP servlet codes sets (adding resources as needed). > > I am sure that there must be some reasonable way to have all of the > servlets (no matter what form) go through some preliminary code, and > some post processing in order not to write the same code into hundreds > of places (and be sure the post processing routine which frees up > resources is ALWAYS executed). > > I have tried to do this with filterchains but am failing so far - due to > ignorance or whatever. I realize that I could modify the source and do > it, but that seems counter productive as this seems like a fairly common > need. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org