You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "M. Amin" <am...@imkenberg.net> on 2001/04/02 15:27:55 UTC

I can't redirect to another xml file when an exception occured. WHY ?

Dear all,
 in xsp i tried to catch an exception to redirect to another xml file but i got
amazing result, the exception is caught successfully but the redirection didn't
occur. I tried to rethrow the exception again inside the catch block and in
this case the redirection works successfully. Is it a bug in cocoon ?
i'm using cocoon 1.8.2 with tomcat 3.2.1
here's an example :
 try {
                      country.validate();
                   }
              catch (com.imkenberg.bo.Exception.ValidationException e){
                rollback = true;
                CurrentDB.rollback();
                String file =response.encodeRedirectUrl("Billing-Address.xml?error=");
                file = file.concat(e.getMessage());
                file = file.concat("&direction=");
                response.sendRedirect(file);
                // i rethrow the exception again to overcome cocoon's bug
                throw e;
              }

WHY I HAVE TO DO IT ?

regards,
 M. Amin

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>