At 08:08 11/01/02 -0600, you wrote:
>Oh the dangers of modifying code without first testing it!
>
>I modified that from a plain 'Exception', because I thought I was being
>clever. Catch either the exact specific Exceptions that may be thrown (eg:
>NullPointer, IO) or just catch 'Exception', as I was originally doing.

Well, I can catch Exception, but know it doesn't works the sendRedirect 
method that you has write. I put the following:

         protected void sendErrorRedirect(HttpServletRequest request, 
HttpServletResponse response, String errorPageURL, Throwable e) {
         try {
       //request.setAttribute ("javax.servlet.jsp.jspException", e);
                         
getServletConfig().getServletContext().getRequestDispatcher(errorPageURL).forward(request,
 
response);
         } catch (Exception ex) {
       log(getServletName() + ".sendErrorRedirect ", ex);
         }
         }

And in the catch part:

} catch (Exception ex) {
    sendErrorRedirect(req, resp, "http://hgarcia/error.html";, ex);
}

How can I redirect an html page, not a jsp page?

Thanks.



---------------------------------------------------------------------
H�ctor Garcia Peris
Dpto. Inform�tica
Instituto Valenciano de Investigaciones Econ�micas S.A. (Ivie)
C/ Guardia Civil, 22 esc-2 1� 46020 - Valencia (Spain)
Tfno.: +34 - 963190050 / +34 - 963930816
Fax.: +34 - 963190055 / +34 - 963930856
e-mail: [EMAIL PROTECTED]
----------------------------------------------------------------------



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to