struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Singh <vinod.si...@agreeya.com>
Subject Re: Handling exceptions in a custom result
Date Tue, 07 Aug 2007 11:29:59 GMT
Do something like below-

<action ...>
   <result name="error">path_to_error.jsp</result>
</action>

    public void execute(ActionInvocation invocation) throws Exception {
        try {
           // Some operations
        } catch (Exception e) {
           //Send user to a error page
           return "error";           
        }
    }
Vinod

-------- Original Message --------
Subject: Handling exceptions in a custom result
From: Juan Damasceno <juan.damasceno@gmail.com>
To: user@struts.apache.org <user@struts.apache.org>
Date: Tuesday, August 07, 2007 4:56:41 PM
> I need to do something like:
>
>     public void execute(ActionInvocation invocation) throws Exception {
>         try {
>            // Some operations
>         } catch (Exception e) {
>            //Send user to a error page
>         }
>     }
>
> Any idea?
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message