tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: The best place for implementing context specific behavior?
Date Thu, 25 Jun 2009 20:34:12 GMT
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 ?

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 "", and the following one for 
"" 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 

Where and how do I do that ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message