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
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
> >
> 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
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
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
5 matches
Mail list logo