I have a question about exceptions thrown by RequestDispatcher . forward ( ), can anyone kindly clarify this thing.
I am using RequestDispatcher . forward ( ) to redirect the browser to a static resource � an xls file. Now, I think I can be sure that it doesn�t throw any exceptions, since its forwarded to a static resource, so can I gobble up the exceptions ??
do u mean u can leave the catch block empty? I do not think that's a wise decision. You have to put a catch block anyway, so why not print the StackTrace?
Moreover, an exception can still occur if the Excel file is moved elsewhere under the context. That's just one cause. Exceptions are supposed to occur at Runtime, so why take a call when you are writing the code? :roll:
Originally posted by john wesley: can I gobble up the exceptions ??
By the way, why you want it that way? Isn't it better to catch the exception and handle it in a more appropriate way. [ September 16, 2005: Message edited by: Adeel Ansari ]