I need a way to handle the exceptions thrown from various methods. In my case the session (HTTP session) may expire at any point and then the the viewer seems not usable but at the same time it doesn’t show any issue, e.g. when page cannot be loaded (getDocumentPageImageHandler throws an exception). I need way to notify user that the session has expired. I need a popup message displaying the exception message and also some way to handle that exception in the JSP page (e.g. reload, use SSO to re-authenticate that user, etc).
Without that users will very ofter run into that issue wihout knowing what is going on. Exception is printed only to the app server log.