André Warnier wrote: > Pid wrote: >> >> The Filter checks the domain name is suitable, /looks up a config object/ >> and drops it into the request attributes for use on the page. > > Ha ! I believe that this is exactly what Jonathan is (or was originally) > looking for. > Where is this "config object", and when and how is it being initialised ?
Right FIFTH attempt to send this email, (dodgy net & crashing mail client - I am *not* shouting at my computer). Short version: It's a custom obj in a DB, it's got lists of CSS/Javascript file URLs, some binary switches for turning on/off blocks of page content. Use the serverName as a key in the DB & a suitable, thread-safe cache. If the number of obj is small, preload the cache at Filter init(). p > I'm continuing for myself right now, just to learn how to do this > correctly. > Suppose I do want to do something different in my (shared, common, > whatever) webapp, depending on the "Host:" header of the request. > And suppose this different thing I want to do, is a bit heavy, so I > don't want to do it all at each request, I want to do some of that work > ahead of time, and re-use it for each request afterward. > > But the requests come in unpredictable order, all to my same webapp, but > one for "apples.company.com", and the following one for > "bananas.company.com" etc. > And when one comes in for "bananas", I want to retrieve what I had > earlier prepared for "bananas", and not what I had prepared for "lemons". > (In other words, I don't want a fruit salad, I want to enjoy each fruit > separately). > > Where and how do I do that ? > > > --------------------------------------------------------------------- > 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