Re: Handling exceptions in a custom result

2007-08-07 Thread Vinod Singh
To do have a similar behavior I have extended ServletDispatcherResult and overridden doExecute(...)- @Override public void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { try { // some operation } catch (Exception e) { su

Re: Handling exceptions in a custom result

2007-08-07 Thread Juan Damasceno
It doesn´t works, the Result is executed after the Interceptors On 8/7/07, Thorsten Schäfer <[EMAIL PROTECTED]> wrote: > > > I need to do something like: > > > > public void execute(ActionInvocation invocation) throws > > Exception { > > try { > >// Some operations > >

RE: Handling exceptions in a custom result

2007-08-07 Thread Thorsten Schäfer
> 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? You could write an intercepto

Re: Handling exceptions in a custom result

2007-08-07 Thread Juan Damasceno
Thanks for reply Vinod, but my class is a Result not a action. public class CustomResult implements Result { public void execute(ActionInvocation invocation) throws Exception { try { // Some operations } catch (Exception e) { //Send user to a error page

Re: Handling exceptions in a custom result

2007-08-07 Thread Vinod Singh
Do something like below- path_to_error.jsp public void execute(ActionInvocation invocation) throws Exception { try { // Some operations } catch (Exception e) { //Send user to a error page return "error"; } } Vinod