This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
To add to the previous (excellent) reply: - You implement HttpSessionListener. your implementation would have code to run when session expires. - You register this class in your web.xml: <listener> <listener-class>yourPackage.YourListener</listener-class> </listener>