Thanks for answering my question.
Let me give more details on my requirements. In our web.xml, we have configured session-timeout to a value of 15 minutes. So, our webcontainer will automatically removes the session if the last accessed time goes more than 15 minutes. Now, we need to show a session expiry page which says "Your Session has Expired" whenever a request belonging to the expired session hits the webcontainer.
So, what logic should i use to determine a request belongs to a expired sesion or not.