Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

redirect or forward from method

Stanislav

2006-12-15

Replies:

   

Hi!

I'm using Strus and this is my problem. I have this method A which have input and
outpur parameters.
There is try/catch block in method A that capture Exceptions. I want to redirect or
forward to jsp
page B from method A when some error is happend and NOT to return to class C from
which method A is
invoked. Is this possible to achieve?


action class C
     invoke method A ----------------> method A
                              have try/catch block
     return values to class C <-------------if ok
                               if error ----------->
redirect/forward to jsp or
some toher class
                                              and not return
anything to
class C

action class C is struts action class
method A is method in normal Java class that extends Action class


Tnx :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.