I tried the crosscontext forward in my action and this worked well. But
the only problem is I need to return an ActionForward from the execute
method. I tried to return NULL and all worked great ie. :
...
getServlet().getServletContext().getContext("/Webapp2").getRequestDispat
cher("/action22.do? event=initCreate").forward(request, response);
Return null;
}
For chance, I don't have bad classloader issues, but I'm not sure if
it's a good practice to return a ActionForward null.
Thank you for your help,
Pass a good week-end.
-----Original Message-----
From: Alexandre Simon [mailto:[EMAIL PROTECTED]
Sent: February 16, 2006 2:14 PM
To: Struts Users Mailing List
Subject: Re: Problem forwarding to an action in another webapp
Action path is relative to the current webapp.
What you want is a crosscontext forward, ie. :
getServletContext().getContext("/Webapp2").getRequestDispatcher("/action
2.do").forward(...)
Be sure your container accept it.
Hope helps.
Mineau, Christian wrote:
>We develop an application with Struts MVC. In this application, we have
>two webApps containing some Struts Actions in each one (i.e two
>Struts-config.xml files). These both webApps are in separate EAR files.
>
>
>
>
>Example:
>
>Webapp1 contains action11 and action12
>
>Webapp2 contains action21 and action22
>
>
>
>My concern is when I'm in the action11 and I want forward in the
>action22 directly I found the error "Invalid path was requested". I
>tried this configuration:
>
>
>
><action path="/action11" type="ca.xyz.Action11" name="action11Form"
>parameter="event">
>
> <forward name="success"
>path="/Webapp2/action22.do?event=initCreate"/>
>
></action>
>
>
>
>Somebody can help me,
>
>Thx.
>
>
>
>
---------------------------------------------------------------------
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]