Short answer - you cant.
Long answer - you can't without some sort of cooperating process on the browser and a complex interaction. I'm assuming a browser popup like a javascript alert is what you want.
Realize that normally a
JSP is writing a complete HTML page that will replace whatever is showing on the user's browser - your side has to send some sort of HTML in response to the request.
You could catch all exceptions and write the JavaScript to do a popup with information, but what would the user see when the popup was dismissed?
Bill