This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I'd like to redirect the user to a login page from within my HttpSessionListener. I cannot find a way to get a hold of the HttpServletResponse object. Can anybody help me?
Thanks eric
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35248
7
posted
0
The point of using listeners generally is to decouple various pieces of code from one another. Code that runs when a session is created or deleted shouldn't be mixed up with code that decides how a response is created.
But there must be a piece of code that creates (or invalidates) the session, thus leading to the event listener being called. Maybe the logic for determining the response would fit in there?