Hi Christian, Thanks again. I think I would have to write my own interceptor. I think I can also get nextPage value from session. i.e. I can set value from my interceptor to a session variable and also from action and then use it. I would try doing that. And if it works out, I would certainly post it.
Thanks & Regards, Rohan >________________________________ > From: Christian Grobmeier <grobme...@gmail.com> >To: rohan jamkhedkar <rgjamkhed...@yahoo.co.in> >Cc: Struts Users Mailing List <user@struts.apache.org> >Sent: Saturday, 19 November 2011 1:42 PM >Subject: Re: Dynamic Result Selection > >On Sat, Nov 19, 2011 at 9:06 AM, rohan jamkhedkar ><rgjamkhed...@yahoo.co.in> wrote: >> Hi Christian, >> Thank you for your response. I had actually defined all three >> results, success, input and error and My class did extend ActionSupport. But >> the problem was, whenever an error occurred during Interceptor invocation, >> framework would try to find value of nextPage. As action is not executed it >> would not find nextPage on valueStack. So I want to know is there any way of >> getting around this problem? Can I specify value for nextPage before any >> interceptor is invoked? > >Ah, now I understand better. > >Have you tried to define a default value for $nextPage in your class? Like: >class MyAction { >private String nextPage = "errorpage.jsp"; > >Actually the action itself will not be executed if an interceptor error occurs. >If the default value does not work, I think it might be a good idea to >write an own interceptor which catches something like that or to >extend the throwing interceptor to put a correct value into the >object. > >cheers >Christian > > >> Thanks & Regards, >> Rohan >> >> ________________________________ >> From: Christian Grobmeier <grobme...@gmail.com> >> To: Struts Users Mailing List <user@struts.apache.org>; rohan jamkhedkar >> <rgjamkhed...@yahoo.co.in> >> Sent: Saturday, 19 November 2011 1:21 PM >> Subject: Re: Dynamic Result Selection >> >> Hello Rohan, >> >> On Sat, Nov 19, 2011 at 8:44 AM, rohan jamkhedkar >> <rgjamkhed...@yahoo.co.in> wrote: >>> >>> <result name="success">%{nextPage}</result> >> >> try to add these results too: >> >> <result name="input">%{nextPage}</result> >> <result name="error">%{nextPage}</result> >> >> Input is what is returned when some input is missing, error in case an >> error happens. >> Please also see the class ActionSupport, were these String constants >> are defined. To use it, extend ActionSupport and return for example: >> return SUCCESS; >> >> Of course you don't need to use ActionSupport, but I think it is a good idea >> :-) >> >> Cheers >> Christian >> >> >> -- >> http://www.grobmeier.de >> https://www.timeandbill.de >> >> >> > > > >-- >http://www.grobmeier.de >https://www.timeandbill.de > > >