Log out when the maxInactiveTime is reached.

I would like to display a message to the user (Clinet) stating that the session has been terminated when the session is closed due to MaxInactiveTime. At present it is set to 600 seconds. I am using JPS for the client and Java for the server with Tomcat 5.5 as the application server.

I have no idea as to how to even get started. I could use some detailed help please.

What I understand is you want to push some kind of message from the server to the client. Keep in mind your JSP is still on the server. the output of the JSP goes on the client. Since HTTP doesn't support this kind of communication it is pretty hard to achieve with communication from the server. You might try to poll the server with AJAX but that actually makes your connection active again.
If you use a client only solution with a timer you might achieve some results. So you would have to control all the communication from each page. Your every link will be backed by JavaScript functions. But you are doomed again when the user connects to your site from another Firefox tab...

I am not sure this is actually possible. If you manage to do it let me know how.