I'm new to JSP development, and I've been wondering: is there any way to execute java code on the end of a session? I know these sessions are managed by the server software (Tomcat 7, in my case).

Thanks in advance for any help!