> -----Original Message----- > From: Mark Kaye > > Thanks Danny. I've looked into this and it seems to be > exactly what I'm looking for. You're a star.
Hmm, it seems I can't use HttpSessionListener after all :(. After looking into it in more depth, it looks like I won't be able to get a handle to the HttpServletRequest that actually contains the information I need to key on i.e. the hostname, or at least the Request URI which I can parse. So, does anyone else have any ideas how to do this? To reiterate my problem briefly: I need to be able to populate the HttpSession with information as soon as the session is created, or at least before the HttpServletResponse is sent back. The information I use in order to decide what to populate the session with is the server hostname. So for instance: www.server1.com - Store "clubName" in session with value "Reds". www.server2.com - Store "clubName" in session with value "Blues". I need to do this so I could (for instance) welcome a visitor to server1.com with "Welcome Reds". I've over simplified my requirement, but the above is the lowest common denominator. I have considered running each host in it's own context in Tomcat. But that's a nightmare in terms of memory bloat. This is how we are currently doing it with our non Struts based app. With just a few contexts the server is almost maxed on memory (2Gb RAM). I may have to put up with redirecting all new sessions to the index page, which I suppose is not too unreasonable, although a little unexpected for a user who has bookmarked or clicked on a deep link - but then this can be an issue with any web application. Any suggestions? Help, as always, much appreciated. Best, M -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>