You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel <da...@top-it.com.br> on 2004/03/04 19:38:37 UTC

success mapping to other module...

How can I make the succes forward to go to other module like this:
        <action
            attribute="GeralUsuarioCadIBean"
            input="/geral/geralUsuarioCad.jsp"
            name="GeralUsuarioCadIBean"
            path="/cadaltUsuario"
            type="com.topit.geral.action.UsuarioIncluirAction"
            validate="false">
            <forward name="success" path="goToModule.do?prefix=/modulo_1&page=/abreusuarioinc.do" />
        </action>


It's doesn't work, I don't know if it possible, I created one action forward and set the success forward for this action forward and doesn't work too, the error at the internet explorer is : The request resource (Servlet action is not available) is not available.


abraços
Daniel S. 

Re: success mapping to other module...

Posted by Geeta Ramani <ge...@cmpco.com>.
Daniel:

Seems like you have too many ".do"s in your success mapping..?

You perhaps may want to do something like this:
    <action
            attribute="GeralUsuarioCadIBean"
            input="/geral/geralUsuarioCad.jsp"
            name="GeralUsuarioCadIBean"
            path="/cadaltUsuario"
            type="com.topit.geral.action.UsuarioIncluirAction"
            validate="false">
            <forward name="success" path="/goToModule" /> -->Change this
        </action>

  and define your goToModule in struts-config.xml in the usual way:
      <action
            path="/goToModule"

            ..etc...

        </action>

If you want request params added on to the path you may either choose to instead use request attributes in your UsuarioIncluirAction OR in the UsuarioIncluirAction, retrieve the ActionForward object using (I'm going from memory here, so you have to check the correct
method names):

ActionForward af = mapping.findForward("success"); //this will give you the goToModule bit).
af.setPath(af.getPath() + "..add the request params here..");

and then return (in your UsuarioIncluirAction) the newly created (modified) ActionMapping..

hope this is clear enough..? (This method actually does work..:))
Regards,
Geeta

Daniel wrote:

> How can I make the succes forward to go to other module like this:
>         <action
>             attribute="GeralUsuarioCadIBean"
>             input="/geral/geralUsuarioCad.jsp"
>             name="GeralUsuarioCadIBean"
>             path="/cadaltUsuario"
>             type="com.topit.geral.action.UsuarioIncluirAction"
>             validate="false">
>             <forward name="success" path="goToModule.do?prefix=/modulo_1&page=/abreusuarioinc.do" />
>         </action>
>
> It's doesn't work, I don't know if it possible, I created one action forward and set the success forward for this action forward and doesn't work too, the error at the internet explorer is : The request resource (Servlet action is not available) is not available.
>
> abraços
> Daniel S.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org