this works & my error page is called BUT the exception stack trace is output to the console regardless - surely if I'm handling the exception this shouldn't happen? - how can I suppress it's output? or am I doing something wrong!
this works & my error page is called BUT the exception stack trace is output to the console regardless
So it is output to the console, is this a problem? You're not actaully managing the Exception, you're allowing the container to manage it, and this is what it is doing. If you don't want it in the console, catch the exception and redirect to the error page instead.
Joined: Jan 23, 2002
Thanks for that David, just one question though, "redirect to the error page instead", I assume you mean using response.sendRedirect("error.jsp")?, won't that lose the exception object from which I want to tell what sort of exception occured? (sorry for being a bit thick!)
I have a struts app which I have to provide a file upload facility. Because I have my Form using enctype="multipart/form-data" the Struts framework generates this warning -
"One of the getParameter family of methods called after reading from the ServletInputStream. Not merging post parameters"
This is because I beleive Struts use's getParameter() in it's standard framework. This however has no adverse effect in my app but obviously I would prefer it not to happen. So hence trying to do the upload using a Servlet cutting out Struts. This works fine except for the error handling!
From my session facade I throw an Exception when there is a problem with the uploaded file i.e InvalidZIPFileException extends Exception. It's this InvalidZIPFileException that I want to pass to my error page & display a custom error message.