Hi Guillermo,

You should be able to add ?method=method2 to your path statement (<forward
name="fwdMethod3" path="/ActionB.do?method=method2"/>.  We use something
very similar for the input tag.  The only thing we do differently is that
we use a different parameter name.  Whereas our base action mappings use
dispatchAction as the parameter, we use "validationFailure" as the
parameter.  If you use a different parameter, you would just need to
replicate the ActionB mapping.

Nick




|---------+---------------------------->
|         |           "Guillermo Meyer"|
|         |           <[EMAIL PROTECTED]|
|         |           ing.com.ar>      |
|         |                            |
|         |           05/17/2004 09:00 |
|         |           AM               |
|         |           Please respond to|
|         |           "Struts Users    |
|         |           Mailing List"    |
|         |                            |
|---------+---------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                          |
  |       To:       "'Struts Users Mailing List'" <[EMAIL PROTECTED]>                  
                                     |
  |       cc:                                                                          
                                          |
  |       Subject:  Linking DispatchActions                                            
                                          |
  
>------------------------------------------------------------------------------------------------------------------------------|




Hi:
I have 2 Action classes (ActionA, ActionB) that extends DispatchAction
class. Each Action has 3 methods: method1, method2 and method3.

This is the executing scenario:
1) a post is made to ActionA.do with parameter set to "method3".
2) DispatchAction execute method3 according to parameter value (a
request.getParameter())
3) ActionA.method3() returns a forward that is declared as follows:
             <forward name="fwdMethod3" path="/ActionB.do"/>

This forward must execute ActionB.method2() when being executed from the
previous forward.

But as ActionB is also a DispatchAction, method3() will be executed
instead of the method I want (method2) because request.getParameter()
from mapping parameter is still method3 and request parameters cannot be
changed during request lifetime.

Possible solution: add a ?method=method2 to the forward path and set
redirect="true"

But i wouldn't like to perform a redirect.
I could overrite DispatchAction.dispatchMethod to "rectify" method name
according to some request attribute, but is there any other way to do
it?

Thanks in advance.

Guillermo Meyer
System Engineer
EDS Argentina - Proyecto X71 Interbanking.
54.11.4322-1307

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a
las personas direccionadas en el mail y puede contener informacion (i)de
propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto
profesional. Cualquier opinion en el contenido, es exclusiva de su autor y
no representa necesariamente la opinion de Interbanking S.A. El acceso no
autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking
S.A no asumira responsabilidad ni obligacion legal alguna por cualquier
informacion incorrecta o alterada contenida en este mensaje. Si usted ha
recibido este mensaje por error, le rogamos tenga la amabilidad de
destruirlo inmediatamente junto con todas las copias del mismo, notificando
al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar
este mensaje ni ninguna de sus partes si usted no es el destinatario.
Muchas gracias.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to