Hi,
I am currently building a sample we site using spring, but I have decided to post it here in
Servlet since I think this is still servlet specific question.
Kindly look at my code. It just basically stream files into the response object so that the user can download it.
Now, my question is, how are we going to gracefully handle servlet exception?
Example is, I click the link to the file but the file isn't in the resources folder, my browser will just go blank as if nothing has happened.
But when I viewed my
Tomcat logs, I saw that there is a Stream Closed Exception. I would like to know, how can I notify the user that there was an error
in downloading the file so that they are well informed instead of a blank browser screen.
I am not sure if this is possible...Thanks.